
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>二、入门 · Spring Boot 中文文档</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="lichongbing.com">
        
        
    
    <link rel="stylesheet" href="../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-tbfed-pagefooter/footer.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-search-plus/search.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-prism/prism-twilight.css">
                
            
                
                <link rel="stylesheet" href="../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    
        
    

        
    
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="getting-started.html" />
    
    
    <link rel="prev" href="boot-documentation.html" />
    

    <style>
    @media only screen and (max-width: 640px) {
        .book-header .hidden-mobile {
            display: none;
        }
    }
    </style>
    <script>
        window["gitbook-plugin-github-buttons"] = {"repo":"lichongbing/springboot","types":["star","watch"],"size":"small"};
    </script>

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../">
            
                <a href="../">
            
                    
                    Introduction
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html">
            
                    
                    前言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#boot-documentation">
            
                    
                    一、Spring Boot 文档
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#boot-documentation-about">
            
                    
                    1、关于本文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#boot-documentation-getting-help">
            
                    
                    2、获取帮助
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#boot-documentation-first-steps">
            
                    
                    3、起步
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#_working_with_spring_boot">
            
                    
                    4、使用 Spring Boot
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#_learning_about_spring_boot_features">
            
                    
                    5、了解 Spring Boot 的新特性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#_moving_to_production">
            
                    
                    6、生产环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.7" data-path="boot-documentation.html">
            
                <a href="boot-documentation.html#_advanced_topics">
            
                    
                    7、高级内容
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter active" data-level="1.4" data-path="getting-started.html">
            
                <a href="getting-started.html">
            
                    
                    二、入门
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-introducing-spring-boot">
            
                    
                    8、Spring Boot 简介
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-system-requirements">
            
                    
                    9、系统要求
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.1" data-path="getting-started.html">
            
                <a href="getting-started.html#_servlet_containers">
            
                    
                    9.1、Servlet 容器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-installing-spring-boot">
            
                    
                    10、安装 Spring Boot
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.1" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-installation-instructions-for-java">
            
                    
                    10.1、针对 Java 开发人员的安装说明
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.1.1" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-maven-installation">
            
                    
                    10.1.1、Maven 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.1.2" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-gradle-installation">
            
                    
                    10.1.2、Gradle 安装
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3.2" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-installing-the-cli">
            
                    
                    10.2、安装 Spring Boot CLI
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.2.1" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-manual-cli-installation">
            
                    
                    10.2.1、手动安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2.2" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-sdkman-cli-installation">
            
                    
                    10.2.2、使用 SDKMAN! 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2.3" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-homebrew-cli-installation">
            
                    
                    10.2.3、使用 OSX Homebrew 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2.4" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-macports-cli-installation">
            
                    
                    10.2.4、使用 MacPorts 安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2.5" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-cli-command-line-completion">
            
                    
                    10.2.5、命令行完成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2.6" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-cli-example">
            
                    
                    10.2.6、快速入门 Spring CLI 示例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3.3" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-upgrading-from-an-earlier-version">
            
                    
                    10.3、升级旧版 Spring Boot
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application">
            
                    
                    11、开发第一个 Spring Boot 应用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.4.1" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-pom">
            
                    
                    11.1、 创建 POM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4.2" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-dependencies">
            
                    
                    11.2、 添加 Classpath 依赖
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4.3" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-code">
            
                    
                    11.3、 编码
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.4.3.1" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-annotations">
            
                    
                    11.3.1、@RestController 与 @RequestMapping 注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4.3.2" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-auto-configuration">
            
                    
                    11.3.2、@EnableAutoConfiguration 注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4.3.3" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-main-method">
            
                    
                    11.3.3、main 方法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.4.4" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-run">
            
                    
                    11.4、运行示例
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4.5" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-first-application-executable-jar">
            
                    
                    11.5、创建可执行 jar
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="getting-started.html">
            
                <a href="getting-started.html#getting-started-whats-next">
            
                    
                    12、下一步
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html">
            
                    
                    三、使用 Spring Boot
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-build-systems">
            
                    
                    13、构建系统
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-dependency-management">
            
                    
                    13.1、依赖管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-maven">
            
                    
                    13.2、Maven
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.2.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-maven-parent-pom">
            
                    
                    13.2.1、继承 Starter Parent
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1.2.1.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-maven-without-a-parent">
            
                    
                    13.2.2、不使用父 POM
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.2.1.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-maven-plugin">
            
                    
                    13.2.3、使用 Spring Boot Maven 插件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.1.3" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-gradle">
            
                    
                    13.3、Gradle
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.4" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-ant">
            
                    
                    13.4、Ant
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.1.5" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-starter">
            
                    
                    13.5、Starter
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-structuring-your-code">
            
                    
                    14、组织代码
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-using-the-default-package">
            
                    
                    14.1、使用 default 包
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-locating-the-main-class">
            
                    
                    14.2、定位主应用类
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-configuration-classes">
            
                    
                    15、配置类
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.3.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-importing-configuration">
            
                    
                    15.1、导入额外的配置类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-importing-xml-configuration">
            
                    
                    15.2、导入 XML 配置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-auto-configuration">
            
                    
                    16、自动配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.4.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-replacing-auto-configuration">
            
                    
                    16.1、平滑替换自动配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-disabling-specific-auto-configuration">
            
                    
                    16.2、禁用指定的自动配置类
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-spring-beans-and-dependency-injection">
            
                    
                    17、Spring Bean 与依赖注入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.6" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-using-springbootapplication-annotation">
            
                    
                    18、使用 @SpringBootApplication 注解
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-running-your-application">
            
                    
                    19、运行您的应用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.7.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-running-your-application">
            
                    
                    19.1、使用 IDE 运行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-running-as-a-packaged-application">
            
                    
                    19.2、作为打包应用运行
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7.3" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-running-with-the-maven-plugin">
            
                    
                    19.3、使用 Maven 插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7.4" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-running-with-the-gradle-plugin">
            
                    
                    19.4、使用 Gradle 插件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.7.5" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-hot-swapping">
            
                    
                    19.5、热交换
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.8" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools">
            
                    
                    20、开发者工具
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.8.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-property-defaults">
            
                    
                    20.1、Property 默认值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-restart">
            
                    
                    20.2、自动重启
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.8.2.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-restart-logging-condition-delta">
            
                    
                    20.2.1、条件评估变更日志
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-restart-exclude">
            
                    
                    20.2.2、排除资源
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2.3" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-restart-additional-paths">
            
                    
                    20.2.3、监视附加路径
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2.4" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-restart-disable">
            
                    
                    20.2.4、禁用重启
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2.5" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-restart-triggerfile">
            
                    
                    20.2.5、使用触发文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2.6" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-customizing-classload">
            
                    
                    20.2.6、自定义重启类加载器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.2.7" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-known-restart-limitations">
            
                    
                    20.2.7、已知限制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.8.3" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-livereload">
            
                    
                    20.3、LiveReload
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.4" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-globalsettings">
            
                    
                    20.4、全局设置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.5" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-remote">
            
                    
                    20.5、远程应用
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.8.5.1" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#_running_the_remote_client_application">
            
                    
                    20.5.1、运行远程客户端应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.8.5.2" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-devtools-remote-update">
            
                    
                    20.5.2、远程更新
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.9" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-packaging-for-production">
            
                    
                    21、打包生产应用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.10" data-path="using-spring-boot.html">
            
                <a href="using-spring-boot.html#using-boot-whats-next">
            
                    
                    22、下一步
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features">
            
                    
                    四、Spring Boot 特性
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-application">
            
                    
                    23、SpringApplication
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-startup-failure">
            
                    
                    23.1、启动失败
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-banner">
            
                    
                    23.2、自定义 banner
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-customizing-spring-application">
            
                    
                    23.3、自定义 SpringApplication
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-customizing-spring-application">
            
                    
                    23.4、Fluent Builder API
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-application-events-and-listeners">
            
                    
                    23.5、应用程序事件与监听器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-web-environment">
            
                    
                    23.6、Web 环境
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-application-arguments">
            
                    
                    23.7、访问应用程序参数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.8" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-command-line-runner">
            
                    
                    23.8、使用 ApplicationRunner 或 ApplicationRunner
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.9" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-application-exit">
            
                    
                    23.9、应用程序退出
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.10" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-application-admin">
            
                    
                    23.10、管理功能
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config">
            
                    
                    24、外部化配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-random-values">
            
                    
                    24.1、配置随机值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-command-line-args">
            
                    
                    24.2、访问命令行属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-application-property-files">
            
                    
                    24.3、应用程序属性文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-profile-specific-properties">
            
                    
                    24.4、特定 Profile 的属性文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-placeholders-in-properties">
            
                    
                    24.5、属性中的占位符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-encrypting-properties">
            
                    
                    24.6、加密属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-yaml">
            
                    
                    24.7、使用 YAML 代替属性文件
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.7.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-loading-yaml">
            
                    
                    24.7.1、加载 YAML
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.7.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-exposing-yaml-to-spring">
            
                    
                    24.7.2、在 Spring Environment 中将 YAML 暴露为属性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.7.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-multi-profile-yaml">
            
                    
                    24.7.3、多 profile YAML 文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.7.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-yaml-shortcomings">
            
                    
                    24.7.4、YAML 的缺点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.2.8" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-typesafe-configuration-properties">
            
                    
                    24.8、类型安全的配置属性
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.8.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-3rd-party-configuration">
            
                    
                    24.8.1、第三方配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.8.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-relaxed-binding">
            
                    
                    24.8.2、宽松绑定
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.8.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-complex-type-merge">
            
                    
                    24.8.3、合并复杂类型
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.8.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-conversion">
            
                    
                    24.8.4、属性转换
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.8.4.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-conversion-duration">
            
                    
                    转换 duration
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.8.4.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-conversion-datasize">
            
                    
                    转换 Data Size
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.2.8.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-validation">
            
                    
                    24.8.5、@ConfigurationProperties 验证
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.8.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-external-config-vs-value">
            
                    
                    24.8.6、@ConfigurationProperties 与 @Value 对比
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-profiles">
            
                    
                    25、Profile
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.3.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-adding-active-profiles">
            
                    
                    25.1、添加激活 Profile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-programmatically-setting-profiles">
            
                    
                    25.2、以编程方式设置 Profile
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-profile-specific-configuration">
            
                    
                    25.3、特定 Profile 的配置文件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-logging">
            
                    
                    26、日志记录
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.4.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-logging-format">
            
                    
                    26.1、日志格式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-logging-console-output">
            
                    
                    26.2、控制台输出
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.4.2.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-logging-color-coded-output">
            
                    
                    26.2.1、着色输出
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.4.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-logging-file-output">
            
                    
                    26.3、文件输出
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-custom-log-levels">
            
                    
                    26.4、日志等级
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-custom-log-groups">
            
                    
                    26.5、日志组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-custom-log-configuration">
            
                    
                    26.6、自定义日志配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-logback-extensions">
            
                    
                    26.7、Logback 扩展
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.4.7.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_profile_specific_configuration">
            
                    
                    26.7.1、特定 Profile 配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.4.7.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_environment_properties">
            
                    
                    26.7.2、环境属性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-json">
            
                    
                    27、JSON
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.5.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-json-jackson">
            
                    
                    27.1、Jackson
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-json-gson">
            
                    
                    27.2、Gson
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-json-json-b">
            
                    
                    27.3、JSON-B
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-developing-web-applications">
            
                    
                    28、开发 Web 应用程序
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc">
            
                    
                    28.1、Spring Web MVC 框架
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.1.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-auto-configuration">
            
                    
                    28.1.1、Spring MVC 自动配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-message-converters">
            
                    
                    28.1.2、HttpMessageConverters
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-message-codes">
            
                    
                    28.1.3、自定义 JSON Serializer 和 Deserializer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-static-content">
            
                    
                    28.1.5、静态内容
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-welcome-page">
            
                    
                    28.1.6、欢迎页面
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-favicon">
            
                    
                    28.1.7、自定义 Favicon
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-pathmatch">
            
                    
                    28.1.8、路径匹配与内容协商
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.8" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-web-binding-initializer">
            
                    
                    28.1.9、ConfigurableWebBindingInitializer
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.9" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-mvc-template-engines">
            
                    
                    28.1.10、模板引擎
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.10" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-error-handling">
            
                    
                    28.1.11、错误处理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.1.10.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-error-handling-custom-error-pages">
            
                    
                    28.1.11.1、自定义错误页面
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.10.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-error-handling-mapping-error-pages-without-mvc">
            
                    
                    28.1.11.2、映射到 Spring MVC 之外的错误页面
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.11" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-hateoas">
            
                    
                    28.1.12、Spring HATEOAS
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.1.12" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-cors">
            
                    
                    28.1.13、CORS 支持
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux">
            
                    
                    28.2、Spring WebFlux 框架
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.2.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux-auto-configuration">
            
                    
                    28.2.1、Spring WebFlux 自动配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.2.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux-httpcodecs">
            
                    
                    28.2.2、使用 HttpMessageReader 和 HttpMessageWriter 作为 HTTP 编解码器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.2.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux-static-content">
            
                    
                    28.2.3、静态内容
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.2.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux-template-engines">
            
                    
                    28.2.4、模板引擎
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.2.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux-error-handling">
            
                    
                    28.2.5、错误处理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.2.5.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux-error-handling-custom-error-pages">
            
                    
                    28.2.5.1、自定义错误页面
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6.2.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webflux-web-filters">
            
                    
                    28.2.6、Web 过滤器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jersey">
            
                    
                    28.3、JAX-RS 与 Jersey
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-embedded-container">
            
                    
                    28.4、内嵌 Servlet 容器支持
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.4.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-embedded-container-servlets-filters-listeners">
            
                    
                    28.4.1、Servlet、Filter 与 Listener
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.4.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-embedded-container-context-initializer">
            
                    
                    28.4.2、Servlet 上下文初始化
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.4.2.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-embedded-container-servlets-filters-listeners-scanning">
            
                    
                    28.4.2.1、扫描 Servlet、Filter 和 Listener
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6.4.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-embedded-container-application-context">
            
                    
                    28.4.3、ServletWebServerApplicationContext
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.4.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-customizing-embedded-containers">
            
                    
                    28.4.4、自定义内嵌 Servlet 容器
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.4.4.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-programmatic-embedded-container-customization">
            
                    
                    28.4.4.1、以编程方式自定义
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.4.4.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-customizing-configurableservletwebserverfactory-directly">
            
                    
                    28.4.4.2、直接自定义 ConfigurableServletWebServerFactory
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6.4.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jsp-limitations">
            
                    
                    28.4.5、JSP 局限
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.6.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-reactive-server">
            
                    
                    28.5、内嵌响应式服务器支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-reactive-server-resources">
            
                    
                    28.6、响应式服务器资源配置
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security">
            
                    
                    29、安全
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.7.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-mvc">
            
                    
                    29.1、MVC 安全
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-webflux">
            
                    
                    29.2、WebFlux 安全
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-oauth2">
            
                    
                    29.3、OAuth2
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.7.3.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-oauth2-client">
            
                    
                    29.3.1、客户端
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.7.3.1.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-oauth2-common-providers">
            
                    
                    OAuth2 客户端注册常见的提供者
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.7.3.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-oauth2-server">
            
                    
                    29.3.2、资源服务器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.3.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_authorization_server">
            
                    
                    29.3.3、授权服务器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.7.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-actuator">
            
                    
                    29.4、Actuator 安全
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.7.4.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-security-csrf">
            
                    
                    29.4.1、跨站请求伪造保护
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-sql">
            
                    
                    30、使用 SQL 数据库
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.8.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-configure-datasource">
            
                    
                    30.1、配置数据源
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.8.1.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-embedded-database-support">
            
                    
                    30.1.1、内嵌数据库支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.1.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connect-to-production-database">
            
                    
                    30.1.2、连接生产数据库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.1.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-a-jndi-datasource">
            
                    
                    30.1.3、连接 JNDI 数据源
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.8.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-using-jdbc-template">
            
                    
                    30.2、使用 JdbcTemplate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jpa-and-spring-data">
            
                    
                    30.3、JPA 与 Spring Data JPA
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.8.3.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jpa-and-spring-data">
            
                    
                    30.3.1、实体类
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.3.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-data-jpa-repositories">
            
                    
                    30.3.2、Spring Data JPA 资源库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.3.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-creating-and-dropping-jpa-databases">
            
                    
                    30.3.3、创建和删除 JPA 数据库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.3.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jpa-in-web-environment">
            
                    
                    30.3.4、在视图中打开 EntityManager
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.8.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-data-jdbc">
            
                    
                    30.4、Spring Data JDBC
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-sql-h2-console">
            
                    
                    30.5、使用 H2 的 Web 控制台
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.8.5.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-sql-h2-console-custom-path">
            
                    
                    30.5.1、更改 H2 控制台的路径
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.8.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jooq">
            
                    
                    30.6、使用 jOOQ
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.8.6.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_code_generation">
            
                    
                    30.6.1、代码生成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.6.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_using_dslcontext">
            
                    
                    30.6.2、使用 DSLContext
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.6.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_jooq_sql_dialect">
            
                    
                    30.6.3、jOOQ SQL 方言
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.8.6.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_customizing_jooq">
            
                    
                    30.6.4、自定义 jOOQ
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-nosql">
            
                    
                    31、使用 NoSQL 技术
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-redis">
            
                    
                    31.1、Redis
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.1.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-redis">
            
                    
                    31.1.1、连接 Redis
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-mongodb">
            
                    
                    31.2、MongoDB
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.2.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-mongodb">
            
                    
                    31.2.1、连接 MongoDB 数据库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.2.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-mongo-template">
            
                    
                    31.2.2、MongoTemplate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.2.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-data-mongo-repositories">
            
                    
                    31.2.3、Spring Data MongoDB 资源库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.2.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-mongo-embedded">
            
                    
                    31.2.4、内嵌 Mongo
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-neo4j">
            
                    
                    31.3、Neo4j
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.3.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-neo4j">
            
                    
                    31.3.1、连接 Neo4j 数据库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.3.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-neo4j-embedded">
            
                    
                    31.3.2、使用内嵌模式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.3.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-neo4j-ogm-session">
            
                    
                    31.3.3、Neo4jSession
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.3.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-data-neo4j-repositories">
            
                    
                    31.3.4、Spring Data Neo4j 资源库
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-gemfire">
            
                    
                    31.4、Gemfire
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-solr">
            
                    
                    31.5、Solr
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.5.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-solr">
            
                    
                    31.5.1、连接 Solr
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.5.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-data-solr-repositories">
            
                    
                    31.5.2、Spring Data Solr 资源库
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-elasticsearch">
            
                    
                    31.6、Elasticsearch
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.6.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-elasticsearch-rest">
            
                    
                    31.6.1、使用 REST 客户端连接 Elasticsearch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.6.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-elasticsearch-jest">
            
                    
                    31.6.2、使用 Jest 连接 Elasticsearch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.6.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-elasticsearch-spring-data">
            
                    
                    31.6.3、使用 Spring Data 连接 Elasticsearch
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.6.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-data-elasticsearch-repositories">
            
                    
                    31.6.4、Spring Data Elasticsearch 资源库
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-cassandra">
            
                    
                    31.7、Cassandra
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.7.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-cassandra">
            
                    
                    31.7.1、连接 Cassandra
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.7.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-data-cassandra-repositories">
            
                    
                    31.7.2、Spring Data Cassandra 资源库
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.8" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-couchbase">
            
                    
                    31.8、Couchbase
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.8.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-couchbase">
            
                    
                    31.8.1、连接 Couchbase
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.8.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spring-data-couchbase-repositories">
            
                    
                    31.8.2、Spring Data Couchbase 资源库
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.9" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-ldap">
            
                    
                    31.9、LDAP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.9.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-ldap-connecting">
            
                    
                    31.9.1、连接 LDAP 服务器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.9.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-ldap-spring-data-repositories">
            
                    
                    31.9.2、Spring Data LDAP 资源库
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9.9.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-ldap-embedded">
            
                    
                    31.9.3、内嵌内存式 LDAP 服务器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.9.10" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-influxdb">
            
                    
                    31.10、InfluxDB
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.10.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-connecting-to-influxdb">
            
                    
                    31.10.1、连接 InfluxDB
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.10" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching">
            
                    
                    32、缓存
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.10.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider">
            
                    
                    32.1、支持的缓存提供者
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.10.1.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-generic">
            
                    
                    32.1.1、Generic
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-jcache">
            
                    
                    32.1.2、JCache (JSR-107)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-ehcache2">
            
                    
                    32.1.3、EhCache 2.x
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-hazelcast">
            
                    
                    32.1.4、Hazelcast
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-infinispan">
            
                    
                    32.1.5、Infinispan
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-couchbase">
            
                    
                    32.1.6、Couchbase
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-redis">
            
                    
                    32.1.7、Redis
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.8" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-caffeine">
            
                    
                    32.1.8、Caffeine
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.9" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-simple">
            
                    
                    32.1.9、Simple
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.1.10" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-caching-provider-none">
            
                    
                    32.1.10、None
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.11" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-messaging">
            
                    
                    33、消息传递
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.11.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jms">
            
                    
                    33.1、JMS
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.11.1.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-activemq">
            
                    
                    33.1.1、ActiveMQ 支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.1.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-artemis">
            
                    
                    33.1.2、Artemis 支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.1.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jms-jndi">
            
                    
                    33.1.3、使用 JNDI ConnectionFactory
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.1.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-using-jms-sending">
            
                    
                    33.1.4、发送消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.1.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-using-jms-receiving">
            
                    
                    33.1.5、接收消息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.11.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-amqp">
            
                    
                    33.2、AMQP
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.11.2.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-rabbitmq">
            
                    
                    33.2.1、RabbitMQ 支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.2.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-using-amqp-sending">
            
                    
                    33.2.2、发送消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.2.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-using-amqp-receiving">
            
                    
                    33.2.3、接收消息
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.11.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kafka">
            
                    
                    33.3、Apache Kafka 支持
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.11.3.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kafka-sending-a-message">
            
                    
                    33.3.1、发送消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.3.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kafka-receiving-a-message">
            
                    
                    33.3.2、接收消息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.3.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kafka-streams">
            
                    
                    33.3.3、Kafka Stream
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.11.3.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kafka-extra-props">
            
                    
                    33.3.4、其他 Kafka 属性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.12" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-resttemplate">
            
                    
                    34、使用 RestTemplate 调用 REST 服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.12.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-resttemplate-customization">
            
                    
                    34.1、自定义 RestTemplate
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.12.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-resttemplate">
            
                    
                    34、使用 RestTemplate 调用 REST 服务
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.13" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webclient">
            
                    
                    35、使用 WebClient 调用 REST 服务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.13.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webclient-runtime">
            
                    
                    35.1、WebClient 运行时
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.13.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webclient-customization">
            
                    
                    35.2、自定义 WebClient
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.14" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-validation">
            
                    
                    36、验证
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.15" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-email">
            
                    
                    37、发送邮件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.16" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jta">
            
                    
                    38、JTA 分布式事务
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.16.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jta-atomikos">
            
                    
                    38.1、使用 Atomikos 事务管理器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.16.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jta-bitronix">
            
                    
                    38.2、使用 Bitronix 事务管理器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.16.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jta-javaee">
            
                    
                    38.3、使用 Java EE 管理的事务管理器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.16.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jta-mixed-jms">
            
                    
                    38.4、混合使用 XA 与非 XA JMS 连接
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.17" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-hazelcast">
            
                    
                    39、Hazelcast
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.18" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-quartz">
            
                    
                    40、Quartz 调度器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.19" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-task-execution-scheduling">
            
                    
                    41、任务执行与调度
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.20" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-integration">
            
                    
                    42、Spring Integration
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.21" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-session">
            
                    
                    43、Spring Session
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.22" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-jmx">
            
                    
                    44、通过 JMX 监控和管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.23" >
            
                <span>
            
                    
                    45、测试
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.24" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-websockets">
            
                    
                    46、WebSocket
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.25" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webservices">
            
                    
                    47、Web Service
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.25.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-webservices-template">
            
                    
                    47.1、使用 WebServiceTemplate 调用 Web Service
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.26" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-developing-auto-configuration">
            
                    
                    49、创建自己的自动配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.26.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-understanding-auto-configured-beans">
            
                    
                    49.1、理解自定配置 Bean
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-locating-auto-configuration-candidates">
            
                    
                    49.2、找到候选的自动配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-condition-annotations">
            
                    
                    49.3、条件注解
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.26.3.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-class-conditions">
            
                    
                    49.3.1、类条件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.3.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-bean-conditions">
            
                    
                    49.3.2、Bean 条件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.3.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-property-conditions">
            
                    
                    49.3.3、属性条件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.3.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-resource-conditions">
            
                    
                    49.3.4、资源条件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.3.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-web-application-conditions">
            
                    
                    49.3.5、Web 应用程序条件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.3.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-spel-conditions">
            
                    
                    49.3.6、SpEL 表达式条件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.26.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-test-autoconfig">
            
                    
                    49.4、测试自动配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.26.4.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_simulating_a_web_context">
            
                    
                    49.4.1、模拟一个 Web 上下文
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.4.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#_overriding_the_classpath">
            
                    
                    49.4.2、覆盖 Classpath
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.26.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-custom-starter">
            
                    
                    49.5、创建自己的 Starter
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.26.5.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-custom-starter-naming">
            
                    
                    49.5.1、命名
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.5.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-custom-starter-module-autoconfigure">
            
                    
                    49.5.2、autoconfigure 模块
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.26.5.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-custom-starter-module-starter">
            
                    
                    49.5.3、Starter 模块
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.27" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin">
            
                    
                    50、Kotlin 支持
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.27.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-requirements">
            
                    
                    50.1、要求
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.27.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-null-safety">
            
                    
                    50.2、Null 安全
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.27.3" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-api">
            
                    
                    50.3、Kotlin API
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.27.3.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-api-runapplication">
            
                    
                    50.3.1、runApplication
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.27.3.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-api-extensions">
            
                    
                    50.3.2、扩展
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.27.4" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-dependency-management">
            
                    
                    50.4、依赖管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.27.5" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-configuration-properties">
            
                    
                    50.5、@ConfigurationProperties
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.27.6" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-testing">
            
                    
                    50.6、测试
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.27.7" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-resources">
            
                    
                    50.7、资源
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.27.7.1" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-resources-further-reading">
            
                    
                    50.7.1、进阶阅读
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.27.7.2" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-kotlin-resources-examples">
            
                    
                    50.7.2、示例
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.28" data-path="spring-boot-features.html">
            
                <a href="spring-boot-features.html#boot-features-whats-next">
            
                    
                    51、下一步
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready">
            
                    
                    五、Spring Boot Actuator: 生产就绪功能
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-enabling">
            
                    
                    52、启用生产就绪功能
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints">
            
                    
                    53、端点
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-enabling-endpoints">
            
                    
                    53.1、启用端点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-exposing-endpoints">
            
                    
                    53.2、暴露端点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-security">
            
                    
                    53.3、保护 HTTP 端点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-caching">
            
                    
                    53.4、配置端点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.5" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-hypermedia">
            
                    
                    53.5、Actuator Web 端点超媒体
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.6" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-cors">
            
                    
                    53.6、跨域支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.7" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-custom">
            
                    
                    53.7、实现自定义端点
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.7.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-custom-input">
            
                    
                    53.7.1、接收输入
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.7.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-custom-web">
            
                    
                    53.7.2、自定义 Web 端点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.7.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-custom-servlet">
            
                    
                    53.7.3、Servlet 端点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.7.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-custom-controller">
            
                    
                    53.7.4、控制器端点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.2.8" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-endpoints-custom-controller">
            
                    
                    53.8、健康信息
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.8.1" data-path="production-ready.html">
            
                <a href="production-ready.html#_auto_configured_healthindicators">
            
                    
                    53.8.1、自动配置的 HealthIndicator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.8.2" data-path="production-ready.html">
            
                <a href="production-ready.html#_writing_custom_healthindicators">
            
                    
                    53.8.2、编写自定义 HealthIndicator
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.8.3" data-path="production-ready.html">
            
                <a href="production-ready.html#reactive-health-indicators">
            
                    
                    53.8.3、响应式健康指示器
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.8.4" data-path="production-ready.html">
            
                <a href="production-ready.html#_auto_configured_reactivehealthindicators">
            
                    
                    53.8.4、自动配置的 ReactiveHealthIndicator
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.2.9" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-application-info">
            
                    
                    53.9、应用程序信息
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.2.9.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-application-info">
            
                    
                    53.9.1、自动配置的 InfoContributor
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.9.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-application-info-env">
            
                    
                    53.9.2、自定义应用程序信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.9.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-application-info-git">
            
                    
                    53.9.3、Git 提交信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.9.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-application-info-build">
            
                    
                    53.9.4、构建信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.2.9.5" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-application-info-build">
            
                    
                    53.9.5、编写自定义 InfoContributor
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-monitoring">
            
                    
                    54、通过 HTTP 监控和管理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.3.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-customizing-management-server-context-path">
            
                    
                    54.1、自定义 Management 端点路径
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-customizing-management-server-port">
            
                    
                    54.2、自定义 Management 服务器端口
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-management-specific-ssl">
            
                    
                    54.3、配置 Management 的 SSL
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-customizing-management-server-address">
            
                    
                    54.4、配置 Management 服务器地址
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.3.5" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-disabling-http-endpoints">
            
                    
                    54.5、禁用 HTTP 端点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-jmx">
            
                    
                    55、通过 JMX 监控和管理
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.4.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-custom-mbean-names">
            
                    
                    55.1、自定义 MBean 名称
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-disable-jmx-endpoints">
            
                    
                    55.2、禁用 JMX 端点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-jolokia">
            
                    
                    55.3、通过 HTTP 使用 Jolokia 访问 JMX
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.4.3.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-customizing-jolokia">
            
                    
                    55.3.1、自定义 Jolokia
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.4.3.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-disabling-jolokia">
            
                    
                    55.3.2、禁用 Jolokia
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.5" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-loggers">
            
                    
                    56、日志记录器
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.5.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-logger-configuration">
            
                    
                    56.1、配置一个日志记录器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.6" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics">
            
                    
                    57、指标
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.6.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-getting-started">
            
                    
                    57.1、入门
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export">
            
                    
                    57.2、支持的监控系统
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.6.2.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-appoptics">
            
                    
                    57.2.1、AppOptics
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-atlas">
            
                    
                    57.2.2、Atlas
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-datadog">
            
                    
                    57.2.3、Datadog
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-dynatrace">
            
                    
                    57.2.4、Dynatrace
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.5" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-elastic">
            
                    
                    57.2.5、Elastic
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.6" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-ganglia">
            
                    
                    57.2.6、Ganglia
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.7" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-graphite">
            
                    
                    57.2.7、Graphite
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.8" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-humio">
            
                    
                    57.2.8、Humio
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.9" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-influx">
            
                    
                    57.2.9、Influx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.10" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-jmx">
            
                    
                    57.2.10、JMX
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.11" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-kairos">
            
                    
                    57.2.11、KairosDB
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.12" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-newrelic">
            
                    
                    57.2.12、New Relic
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.13" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-prometheus">
            
                    
                    57.2.13、Prometheus
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.14" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-signalfx">
            
                    
                    57.2.14、SignalFx
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.15" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-simple">
            
                    
                    57.2.15、Simple
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.16" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-statsd">
            
                    
                    57.2.16、StatsD
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.2.17" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-export-wavefront">
            
                    
                    57.2.17、Wavefront
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.6.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-meter">
            
                    
                    57.3、支持的指标
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.6.3.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-spring-mvc">
            
                    
                    57.3.1、Spring MVC 指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.3.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-web-flux">
            
                    
                    57.3.2、Spring WebFlux 指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.3.3" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-jersey-server">
            
                    
                    57.3.3、Jersey Server 指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.3.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-http-clients">
            
                    
                    57.3.4、HTTP Client 指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.3.5" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-cache">
            
                    
                    57.3.5、Cache 指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.3.6" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-jdbc">
            
                    
                    57.3.6、数据源指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.3.7" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-hibernate">
            
                    
                    57.3.7、Hibernate 指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.3.8" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-rabbitmq">
            
                    
                    57.3.8、RabbitMQ 指标
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.6.4" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-custom">
            
                    
                    57.4、注册自定义指标
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.5" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-per-meter-properties">
            
                    
                    57.5、自定义单独指标
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.6.5.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-common-tags">
            
                    
                    57.5.1、自定义标签
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.6.5.2" data-path="production-ready.html">
            
                <a href="production-ready.html#_per_meter_properties">
            
                    
                    57.5.2、Per-meter 属性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.6.6" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-metrics-endpoint">
            
                    
                    57.6、指标端点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.7" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-auditing">
            
                    
                    58、审计
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.8" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-http-tracing">
            
                    
                    59、HTTP 追踪
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.8.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-http-tracing-custom">
            
                    
                    59.1、自定义 HTTP 追踪
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.9" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-process-monitoring">
            
                    
                    60、进程监控
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.9.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-process-monitoring-configuration">
            
                    
                    60.1、扩展配置
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.9.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-process-monitoring-configuration">
            
                    
                    60.2、编程方式
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.10" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-cloudfoundry">
            
                    
                    61、Cloud Foundry 支持
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.7.10.1" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-cloudfoundry-disable">
            
                    
                    61.1、禁用 Cloud Foundry Actuator 扩展支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.10.2" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-cloudfoundry-ssl">
            
                    
                    61.2、Cloud Foundry 自签名证书
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.7.10.3" data-path="production-ready.html">
            
                <a href="production-ready.html#_custom_context_path">
            
                    
                    61.3、自定义上下文路径
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.7.11" data-path="production-ready.html">
            
                <a href="production-ready.html#production-ready-auditing">
            
                    
                    62、下一步
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.8" data-path="deployment.html">
            
                <a href="deployment.html">
            
                    
                    六、部署 Spring Boot 应用程序
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.8.1" >
            
                <span>
            
                    
                    63、部署到云端
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.2" >
            
                <span>
            
                    
                    64、安装 Spring Boot 应用程序
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.8.3" >
            
                <span>
            
                    
                    65、下一步
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.9" >
            
                <span>
            
                    
                    七、Spring Boot CLI
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.9.1" >
            
                <span>
            
                    
                    66、安装 CLI
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.2" >
            
                <span>
            
                    
                    67、使用 CLI
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.3" >
            
                <span>
            
                    
                    68、使用 Groovy Beans DSL 部署应用程序
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.4" >
            
                <span>
            
                    
                    69、使用  配置 CLI
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.9.5" >
            
                <span>
            
                    
                    70、下一步
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.10" >
            
                <span>
            
                    
                    八、构建工具插件
            
                </span>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.10.1" >
            
                <span>
            
                    
                    71、Spring Boot Maven 插件
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.2" >
            
                <span>
            
                    
                    72、Spring Boot Gradle 插件
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.3" >
            
                <span>
            
                    
                    73、Spring Boot AntLib 模块
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.4" >
            
                <span>
            
                    
                    74、支持其他构建系统
            
                </span>
            

            
        </li>
    
        <li class="chapter " data-level="1.10.5" >
            
                <span>
            
                    
                    75、下一步
            
                </span>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href=".." >二、入门</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div class="search-plus" id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <p><a id="getting-started"></a></p>
<h1 id="&#x4E8C;&#x3001;&#x5165;&#x95E8;">&#x4E8C;&#x3001;&#x5165;&#x95E8;</h1>
<p>&#x5982;&#x679C;&#x60A8;&#x662F;&#x521A;&#x5F00;&#x59CB;&#x4F7F;&#x7528; Spring Boot&#xFF0C;&#x6216;&#x8005;&#x5BF9; Spring &#x6709;&#x70B9;&#x5370;&#x8C61;&#xFF0C;&#x90A3;&#x4E48;&#x8FD9;&#x90E8;&#x5206;&#x5185;&#x5BB9;&#x662F;&#x4E3A;&#x60A8;&#x51C6;&#x5907;&#x7684;&#xFF01;&#x5728;&#x8FD9;&#x91CC;&#x6211;&#x4EEC;&#x5C06;&#x7ED9;&#x51FA;&#x57FA;&#x672C;&#x7684;&#x201C;&#x662F;&#x4EC0;&#x4E48;&#xFF1F;&#x201D;&#x3001;&#x201C;&#x600E;&#x4E48;&#x505A;&#xFF1F;&#x201D;&#x3001;&#x201C;&#x4E3A;&#x4EC0;&#x4E48;&#xFF1F;&#x201D;&#x8FD9;&#x7C7B;&#x95EE;&#x9898;&#x7684;&#x7B54;&#x6848;&#x3002;&#x8FD9;&#x662F;&#x4E00;&#x4EFD;&#x53CB;&#x597D;&#x7684; Spring Boot &#x7B80;&#x4ECB;&#x548C;&#x5B89;&#x88C5;&#x8BF4;&#x660E;&#x3002;&#x5F53;&#x6211;&#x4EEC;&#x5728;&#x8BA8;&#x8BBA;&#x4E00;&#x4E9B;&#x6838;&#x5FC3;&#x539F;&#x7406;&#x4E4B;&#x540E;&#xFF0C;&#x6211;&#x4EEC;&#x5C06;&#x6784;&#x5EFA;&#x7B2C;&#x4E00;&#x4E2A; Spring Boot &#x5E94;&#x7528;&#x3002;</p>
<p><a id="getting-started-introducing-spring-boot"></a></p>
<h2 id="8&#x3001;spring-boot-&#x7B80;&#x4ECB;">8&#x3001;Spring Boot &#x7B80;&#x4ECB;</h2>
<p>&#x4F7F;&#x7528; Spring Boot &#x53EF;&#x4EE5;&#x5F88;&#x5BB9;&#x6613;&#x5730;&#x521B;&#x5EFA;&#x51FA;&#x80FD;&#x76F4;&#x63A5;&#x8FD0;&#x884C;&#x7684;&#x72EC;&#x7ACB;&#x7684;&#x3001;&#x751F;&#x4EA7;&#x7EA7;&#x522B;&#x7684;&#x57FA;&#x4E8E; Spring &#x7684;&#x5E94;&#x7528;&#x3002;&#x6211;&#x4EEC;&#x5BF9; Spring &#x5E73;&#x53F0;&#x548C;&#x7B2C;&#x4E09;&#x65B9;&#x7C7B;&#x5E93;&#x6709;&#x81EA;&#x5DF1;&#x7684;&#x8003;&#x8651;&#xFF0C;&#x56E0;&#x6B64;&#x60A8;&#x53EF;&#x4EE5;&#x4ECE;&#x6700;&#x57FA;&#x672C;&#x7684;&#x5F00;&#x59CB;&#x3002;&#x5927;&#x591A;&#x6570; Spring Boot &#x5E94;&#x7528;&#x53EA;&#x9700;&#x8981;&#x5F88;&#x5C11;&#x7684; Spring &#x914D;&#x7F6E;&#x3002;</p>
<p>&#x60A8;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; Spring Boot &#x6765;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>java -jar</code> &#x547D;&#x4EE4;&#x6765;&#x8FD0;&#x884C;&#x6216;&#x8005;&#x57FA;&#x4E8E;&#x4F20;&#x7EDF;&#x7684; war &#x5305;&#x90E8;&#x7F72;&#x7684;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x3002;&#x6211;&#x4EEC;&#x8FD8;&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x7528;&#x4E8E;&#x8FD0;&#x884C; spring scripts &#x7684;&#x547D;&#x4EE4;&#x884C;&#x5DE5;&#x5177;&#x3002;</p>
<p>&#x6211;&#x4EEC;&#x7684;&#x4E3B;&#x8981;&#x76EE;&#x6807;&#x662F;&#xFF1A;</p>
<ul>
<li>&#x4E3A;&#x6240;&#x6709; Spring Boot &#x5F00;&#x53D1;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;&#x66F4;&#x5FEB;&#x3001;&#x66F4;&#x5168;&#x9762;&#x7684;&#x5165;&#x95E8;&#x4F53;&#x9A8C;&#x3002;</li>
<li>&#x575A;&#x6301;&#x81EA;&#x6211;&#x867D;&#x597D;&#xFF0C;&#x4F46;&#x5F53;&#x9700;&#x6C42;&#x51FA;&#x73B0;&#x504F;&#x79BB;&#xFF0C;&#x60A8;&#x9700;&#x8981;&#x80FD;&#x8FC5;&#x901F;&#x6446;&#x8131;&#x51FA;&#x6765;&#x3002;</li>
<li>&#x63D0;&#x4F9B;&#x5927;&#x91CF;&#x975E;&#x529F;&#x80FD;&#x6027;&#x7279;&#x6027;&#x76F8;&#x5173;&#x9879;&#x76EE;&#xFF08;&#x4F8B;&#x5982;&#xFF1A;&#x5185;&#x5D4C;&#x670D;&#x52A1;&#x5668;&#x3001;&#x5B89;&#x5168;&#x3001;&#x6307;&#x6807;&#x3001;&#x5065;&#x5EB7;&#x68C0;&#x67E5;&#x3001;&#x5916;&#x90E8;&#x914D;&#x7F6E;)&#x3002;</li>
<li>&#x7EDD;&#x5BF9;&#x6CA1;&#x6709;&#x4EE3;&#x7801;&#x751F;&#x6210;&#xFF0C;&#x4E5F;&#x4E0D;&#x8981;&#x6C42; XML &#x914D;&#x7F6E;&#x3002;</li>
</ul>
<p><a id="getting-started-system-requirements"></a></p>
<h2 id="9&#x3001;&#x7CFB;&#x7EDF;&#x8981;&#x6C42;">9&#x3001;&#x7CFB;&#x7EDF;&#x8981;&#x6C42;</h2>
<p>&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;Spring Boot 1.5.4.RELEASE &#x9700;&#x8981; <a href="https://www.java.com/" target="_blank">Java 7</a> &#x548C; Spring Framework 4.3.9.RELEASE &#x6216;&#x8005;&#x66F4;&#x9AD8;&#x7248;&#x672C;&#x3002;&#x60A8;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x5176;&#x4ED6;&#x914D;&#x7F6E;&#x4F7F; Java 6 &#x914D;&#x5408; Spring Boot&#x3002;&#x66F4;&#x591A;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x89C1;<a href="howto.md#howto-use-java-6">&#x7B2C; 84.11&#x8282;&#xFF0C;&#x201C;&#x5982;&#x4F55;&#x4F7F;&#x7528; Java 6&#x201D;</a>&#x3002;Spring Boot &#x4E3A; Maven&#xFF08;3.2+&#xFF09;&#xFF0C;&#x548C; Gradle 2&#xFF08;2.9 &#x6216;&#x8005;&#x66F4;&#x9AD8;&#x7248;&#x672C;&#xFF09;&#x548C; Gradle 3 &#x63D0;&#x4F9B;&#x4E86;&#x663E;&#x5F0F;&#x6784;&#x5EFA;&#x652F;&#x6301;&#x3002;</p>
<p><strong>&#x63D0;&#x793A;</strong></p>
<blockquote>
<p>&#x867D;&#x7136;&#x60A8;&#x53EF;&#x4EE5;&#x5728; Java 6 &#x6216;&#x8005; Java 7 &#x4E0A;&#x4F7F;&#x7528; Spring Boot&#xFF0C;&#x4F46;&#x6211;&#x4EEC;&#x8FD8;&#x662F;&#x5F3A;&#x70C8;&#x63A8;&#x8350;&#x60A8;&#x4F7F;&#x7528; Java 8&#x3002;</p>
</blockquote>
<p><a id="_servlet_containers"></a></p>
<h3 id="91&#x3001;servlet-&#x5BB9;&#x5668;">9.1&#x3001;Servlet &#x5BB9;&#x5668;</h3>
<p>&#x652F;&#x6301;&#x4EE5;&#x4E0B;&#x5D4C;&#x5165;&#x5F0F;&#x5BB9;&#x5668;&#x5F00;&#x7BB1;&#x5373;&#x7528;&#xFF1A;</p>
<table>
<thead>
<tr>
<th style="text-align:left">&#x540D;&#x79F0;</th>
<th style="text-align:left">Servlet &#x7248;&#x672C;</th>
<th style="text-align:left">Java &#x7248;&#x672C;</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align:left">Tomcat 8</td>
<td style="text-align:left">3.1</td>
<td style="text-align:left">Java 7+</td>
</tr>
<tr>
<td style="text-align:left">Tomcat 7</td>
<td style="text-align:left">3.0</td>
<td style="text-align:left">Java 6+</td>
</tr>
<tr>
<td style="text-align:left">Jetty 9.3</td>
<td style="text-align:left">3.1</td>
<td style="text-align:left">Java 8+</td>
</tr>
<tr>
<td style="text-align:left">Jetty 9.2</td>
<td style="text-align:left">3.1</td>
<td style="text-align:left">Java 7+</td>
</tr>
<tr>
<td style="text-align:left">Jetty 8</td>
<td style="text-align:left">3.0</td>
<td style="text-align:left">Java 6+</td>
</tr>
<tr>
<td style="text-align:left">Undertow 1.3</td>
<td style="text-align:left">3.1</td>
<td style="text-align:left">Java 7+</td>
</tr>
</tbody>
</table>
<p>&#x60A8;&#x53EF;&#x4EE5;&#x5C06; Spring Boot &#x5E94;&#x7528;&#x90E8;&#x7F72;&#x5230;&#x4EFB;&#x4F55;&#x4E00;&#x4E2A; Servlet 3.0+ &#x517C;&#x5BB9;&#x5BB9;&#x5668;&#x4E2D;&#x3002;</p>
<p><a id="getting-started-installing-spring-boot"></a></p>
<h2 id="10&#x3001;&#x5B89;&#x88C5;-spring-boot">10&#x3001;&#x5B89;&#x88C5; Spring Boot</h2>
<p>Spring Boot &#x53EF;&#x4EE5;&#x4E0E;<strong>&#x7ECF;&#x5178;</strong>&#x7684; Java &#x5F00;&#x53D1;&#x5DE5;&#x5177;&#x4E00;&#x8D77;&#x4F7F;&#x7528;&#x6216;&#x8005;&#x4F5C;&#x4E3A;&#x547D;&#x4EE4;&#x884C;&#x5DE5;&#x5177;&#x5B89;&#x88C5;&#x3002;&#x65E0;&#x8BBA;&#x5982;&#x4F55;&#xFF0C;&#x60A8;&#x5C06;&#x9700;&#x8981; <a href="https://www.java.com/" target="_blank">Java SDK 1.6</a> &#x6216;&#x8005;&#x66F4;&#x9AD8;&#x7248;&#x672C;&#x3002;&#x5728;&#x5F00;&#x59CB;&#x4E4B;&#x524D;&#x60A8;&#x5E94;&#x8BE5;&#x68C0;&#x67E5; Java &#x7684;&#x5B89;&#x88C5;&#x60C5;&#x51B5;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">$ java -version
</code></pre>
<p>&#x5982;&#x679C;&#x60A8;&#x662F; Java &#x5F00;&#x53D1;&#x65B0;&#x624B;&#xFF0C;&#x6216;&#x8005;&#x60A8;&#x53EA;&#x60F3;&#x5C1D;&#x8BD5;&#x4F7F;&#x7528; Spring Boot&#xFF0C;&#x60A8;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x9996;&#x5148;&#x5C1D;&#x8BD5;&#x4F7F;&#x7528; <a href="#getting-started-installing-the-cli">Spring Boot CLI</a>&#xFF0C;&#x5426;&#x5219;&#x8BF7;&#x9605;&#x8BFB;&#x7ECF;&#x5178;&#x7684;&#x5B89;&#x88C5;&#x8BF4;&#x660E;&#x3002;</p>
<p><strong>&#x63D0;&#x793A;</strong></p>
<blockquote>
<p>&#x867D;&#x7136; Spring Boot &#x652F;&#x6301; Java 1.6&#xFF0C;&#x4F46;&#x662F;&#x5982;&#x679C;&#x53EF;&#x4EE5;&#xFF0C;&#x60A8;&#x5E94;&#x8BE5;&#x8003;&#x8651;&#x4F7F;&#x7528;&#x6700;&#x65B0;&#x7684; Java &#x7248;&#x672C;&#x3002;</p>
</blockquote>
<p><a id="getting-started-installation-instructions-for-java"></a></p>
<h3 id="101&#x3001;&#x9488;&#x5BF9;-java-&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x7684;&#x5B89;&#x88C5;&#x8BF4;&#x660E;">10.1&#x3001;&#x9488;&#x5BF9; Java &#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x7684;&#x5B89;&#x88C5;&#x8BF4;&#x660E;</h3>
<p>&#x60A8;&#x53EF;&#x4EE5;&#x8DDF;&#x4F7F;&#x7528;&#x4EFB;&#x4F55;&#x6807;&#x51C6; Java &#x5E93;&#x7684;&#x65B9;&#x5F0F;&#x4E00;&#x6837;&#x4F7F;&#x7528; Spring Boot&#x3002;&#x53EA;&#x9700;&#x8981;&#x5728; classpath &#x4E0B;&#x5305;&#x542B;&#x76F8;&#x5E94;&#x7684; <code>spring-boot-*.jar</code> &#x6587;&#x4EF6;&#x5373;&#x53EF;&#x3002;Spring Boot &#x4E0D;&#x9700;&#x8981;&#x4EFB;&#x4F55;&#x4E13;&#x7528;&#x7684;&#x5DE5;&#x5177;&#x6765;&#x96C6;&#x6210;&#xFF0C;&#x56E0;&#x6B64;&#x60A8;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#x4EFB;&#x4F55; IDE &#x6216;&#x8005;&#x6587;&#x672C;&#x7F16;&#x8F91;&#x5668;&#xFF0C;&#x5E76;&#x4E14; Spring Boot &#x5E94;&#x7528;&#x4E5F;&#x6CA1;&#x4EC0;&#x4E48;&#x7279;&#x6B8A;&#x4E4B;&#x5904;&#xFF0C;&#x56E0;&#x6B64;&#x53EF;&#x4EE5;&#x50CF;&#x4EFB;&#x4F55;&#x5176;&#x5B83; Java &#x7A0B;&#x5E8F;&#x4E00;&#x6837;&#x8FD0;&#x884C;&#x548C;&#x8C03;&#x8BD5;&#x3002;</p>
<p>&#x867D;&#x7136;&#x60A8;&#x53EF;&#x4EE5;&#x590D;&#x5236; Spring Boot &#x7684; jar &#x6587;&#x4EF6;&#xFF0C;&#x4F46;&#x6211;&#x4EEC;&#x901A;&#x5E38;&#x5EFA;&#x8BAE;&#x60A8;&#x4F7F;&#x7528;&#x652F;&#x6301;&#x4F9D;&#x8D56;&#x7BA1;&#x7406;&#x7684;&#x6784;&#x5EFA;&#x5DE5;&#x5177;&#xFF08;&#x6BD4;&#x5982; Maven &#x6216;&#x8005; Gradle&#xFF09;&#x3002;</p>
<p><a id="getting-started-maven-installation"></a></p>
<h3 id="1011&#x3001;&#x4F7F;&#x7528;-maven-&#x5B89;&#x88C5;">10.1.1&#x3001;&#x4F7F;&#x7528; Maven &#x5B89;&#x88C5;</h3>
<p>Spring Boot &#x517C;&#x5BB9; Apache Maven 3.2 &#x6216;&#x66F4;&#x9AD8;&#x7248;&#x672C;&#x3002;&#x5982;&#x679C;&#x60A8;&#x8FD8;&#x6CA1;&#x6709;&#x5B89;&#x88C5; Maven&#xFF0C;&#x53EF;&#x4EE5;&#x5230; <a href="https://maven.apache.org/" target="_blank">maven.apache.org</a> &#x4E0A;&#x6309;&#x7167;&#x8BF4;&#x660E;&#x8FDB;&#x884C;&#x64CD;&#x4F5C;&#x3002;</p>
<p><strong>&#x63D0;&#x793A;</strong></p>
<blockquote>
<p>&#x5728;&#x8BB8;&#x591A;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x4E0A;&#xFF0C;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x8F6F;&#x4EF6;&#x5305;&#x7BA1;&#x7406;&#x5668;&#x6765;&#x5B89;&#x88C5; Maven&#x3002;&#x5982;&#x679C;&#x60A8;&#x662F; OSX Homebrew &#x7528;&#x6237;&#xFF0C;&#x8BF7;&#x5C1D;&#x8BD5;&#x4F7F;&#x7528; <code>brew install maven</code>&#x3002;Ubuntu &#x7528;&#x6237;&#x53EF;&#x4EE5;&#x8FD0;&#x884C; <code>sudo apt-get install maven</code>&#x3002;</p>
</blockquote>
<p>Spring Boot &#x4F9D;&#x8D56;&#x4F7F;&#x7528;&#x5230;&#x4E86; <code>org.springframework.boot</code> <code>groupId</code>&#x3002;&#x901A;&#x5E38;&#xFF0C;&#x60A8;&#x7684; Maven POM &#x6587;&#x4EF6;&#x5C06;&#x4ECE; <code>spring-boot-starter-parent</code> &#x9879;&#x76EE;&#x7EE7;&#x627F;&#xFF0C;&#x5E76;&#x58F0;&#x660E;&#x4E00;&#x4E2A;&#x6216;&#x591A;&#x4E2A; <a href="using-boot-starter.md">Starter</a> &#x4F9D;&#x8D56;&#x3002;Spring Boot &#x8FD8;&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x53EF;&#x9009;&#x7684; <a href="#build-tool-plugins-maven-plugin">Maven &#x63D2;&#x4EF6;</a>&#x6765;&#x521B;&#x5EFA;&#x53EF;&#x6267;&#x884C; jar&#x3002;</p>
<p>&#x8FD9;&#x662F;&#x4E00;&#x4E2A;&#x5178;&#x578B;&#x7684; <code>pom.xml</code> &#x6587;&#x4EF6;&#xFF1A;</p>
<pre class="language-"><code class="lang-xml"><span class="token prolog">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>project</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>http://maven.apache.org/POM/4.0.0<span class="token punctuation">&quot;</span></span> <span class="token attr-name"><span class="token namespace">xmlns:</span>xsi</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>http://www.w3.org/2001/XMLSchema-instance<span class="token punctuation">&quot;</span></span>
    <span class="token attr-name"><span class="token namespace">xsi:</span>schemaLocation</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>modelVersion</span><span class="token punctuation">&gt;</span></span>4.0.0<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>modelVersion</span><span class="token punctuation">&gt;</span></span>

    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>com.example<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>myproject<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>0.0.1-SNAPSHOT<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>

    <span class="token comment">&lt;!-- Inherit defaults from Spring Boot --&gt;</span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>parent</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>org.springframework.boot<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>spring-boot-starter-parent<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>1.5.9.RELEASE<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>parent</span><span class="token punctuation">&gt;</span></span>

    <span class="token comment">&lt;!-- Add typical dependencies for a web application --&gt;</span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependencies</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependency</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>org.springframework.boot<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>spring-boot-starter-web<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependency</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependencies</span><span class="token punctuation">&gt;</span></span>

    <span class="token comment">&lt;!-- Package as an executable jar --&gt;</span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>build</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>plugins</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>plugin</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>org.springframework.boot<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
                <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>spring-boot-maven-plugin<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>plugin</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>plugins</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>build</span><span class="token punctuation">&gt;</span></span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>project</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p><strong>&#x63D0;&#x793A;</strong></p>
<blockquote>
<p><code>spring-boot-starter-parent</code> &#x662F;&#x4E00;&#x4E2A;&#x4F7F;&#x7528; Spring Boot &#x7684;&#x597D;&#x65B9;&#x5F0F;&#xFF0C;&#x4F46;&#x5B83;&#x5E76;&#x4E0D;&#x662F;&#x4EFB;&#x4F55;&#x65F6;&#x5019;&#x90FD;&#x9002;&#x7528;&#x3002;&#x6709;&#x65F6;&#x60A8;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x7EE7;&#x627F;&#x4E0D;&#x540C;&#x7684;&#x7236; POM&#xFF0C;&#x6216;&#x8005;&#x60A8;&#x4E0D;&#x559C;&#x6B22;&#x6211;&#x4EEC;&#x7684;&#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#x3002;&#x8BF7;&#x53C2;&#x89C1;<a href="#using-boot-maven-without-a-parent">&#x7B2C; 13.2.2 &#x8282;, &#x201C;&#x4F7F;&#x7528;&#x4E0D;&#x5E26;&#x7236; POM &#x7684; Spring Boot&#x201D;</a> &#x4F5C;&#x4E3A;&#x7684;&#x66FF;&#x4EE3;&#x65B9;&#x6848;&#xFF0C;&#x5176;&#x4F7F;&#x7528;&#x4E86; <code>import</code> Scope&#x3002;</p>
</blockquote>
<p><a id="getting-started-gradle-installation"></a></p>
<h3 id="1012&#x3001;&#x4F7F;&#x7528;-gradle-&#x5B89;&#x88C5;">10.1.2&#x3001;&#x4F7F;&#x7528; Gradle &#x5B89;&#x88C5;</h3>
<p>Spring Boot &#x517C;&#x5BB9; Gradle 2 (2.9 &#x6216;&#x8005;&#x66F4;&#x9AD8;&#x7248;&#x672C;)&#x548C; Gradle 3&#x3002;&#x5982;&#x679C;&#x60A8;&#x8FD8;&#x6CA1;&#x6709;&#x5B89;&#x88C5; Gradle&#xFF0C;&#x60A8;&#x53EF;&#x4EE5;&#x6309;&#x7167; <a href="http://www.gradle.org/" target="_blank">www.gradle.org/</a> &#x4E0A;&#x7684;&#x8BF4;&#x660E;&#x8FDB;&#x884C;&#x64CD;&#x4F5C;&#x3002;</p>
<p>Spring Boot &#x4F9D;&#x8D56; <code>org.springframework.boot</code> <code>group</code>&#x3002;&#x901A;&#x5E38;&#xFF0C;&#x60A8;&#x7684;&#x9879;&#x76EE;&#x5C06;&#x58F0;&#x660E;&#x4E00;&#x4E2A;&#x6216;&#x8005;&#x591A;&#x4E2A; <a href="using-boot-starter.md">Starter</a> &#x7684;&#x4F9D;&#x8D56;&#x3002;Spring Boot &#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x6709;&#x7528;&#x7684; <a href="#build-tool-plugins-gradle-plugin">Gradle &#x63D2;&#x4EF6;</a>&#xFF0C;&#x53EF;&#x7528;&#x4E8E;&#x7B80;&#x5316;&#x4F9D;&#x8D56;&#x58F0;&#x660E;&#x548C;&#x521B;&#x5EFA;&#x53EF;&#x6267;&#x884C; jar &#x6587;&#x4EF6;&#x3002;</p>
<p><strong>Gradle Wrapper</strong></p>
<blockquote>
<p>&#x5F53;&#x60A8;&#x8BB8;&#x9700;&#x8981;&#x6784;&#x5EFA;&#x9879;&#x76EE;&#x65F6;&#xFF0C;Gradle Wrapper &#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x7528;&#x4E8E;&#x83B7;&#x53D6; Gradle &#x7684;&#x597D;&#x65B9;&#x6CD5;&#x3002;&#x5B83;&#x662F;&#x7531;&#x5C0F;&#x811A;&#x672C;&#x548C;&#x5E93;&#x7EC4;&#x6210;&#xFF0C;&#x60A8;&#x5728;&#x63D0;&#x4EA4;&#x7684;&#x540C;&#x65F6;&#xFF0C;&#x60A8;&#x7684;&#x4EE3;&#x7801;&#x5C06;&#x5F15;&#x5BFC;&#x6784;&#x5EFA;&#x6D41;&#x7A0B;&#x3002;&#x66F4;&#x591A;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605; <a href="https://docs.gradle.org/2.14.1/userguide/gradle_wrapper.html" target="_blank">docs.gradle.org/2.14.1/userguide/gradle_wrapper.html</a>&#x3002;</p>
</blockquote>
<p>&#x8FD9;&#x662F;&#x4E00;&#x4E2A;&#x5178;&#x578B;&#x7684; <code>build.gradle</code> &#x6587;&#x4EF6;&#xFF1A;</p>
<pre class="language-"><code class="lang-groovy">plugins <span class="token punctuation">{</span>
    id <span class="token string">&apos;org.springframework.boot&apos;</span> version <span class="token string">&apos;1.5.4.RELEASE&apos;</span>
    id <span class="token string">&apos;java&apos;</span>
<span class="token punctuation">}</span>


jar <span class="token punctuation">{</span>
    baseName <span class="token operator">=</span> <span class="token string">&apos;myproject&apos;</span>
    version <span class="token operator">=</span>  <span class="token string">&apos;0.0.1-SNAPSHOT&apos;</span>
<span class="token punctuation">}</span>

repositories <span class="token punctuation">{</span>
    <span class="token function">jcenter</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>

dependencies <span class="token punctuation">{</span>
    <span class="token function">compile</span><span class="token punctuation">(</span><span class="token string">&quot;org.springframework.boot:spring-boot-starter-web&quot;</span><span class="token punctuation">)</span>
    <span class="token function">testCompile</span><span class="token punctuation">(</span><span class="token string">&quot;org.springframework.boot:spring-boot-starter-test&quot;</span><span class="token punctuation">)</span>
<span class="token punctuation">}</span>
</code></pre>
<p><a id="getting-started-installing-the-cli"></a></p>
<h3 id="102&#x3001;&#x5B89;&#x88C5;-spring-boot-cli">10.2&#x3001;&#x5B89;&#x88C5; Spring Boot CLI</h3>
<p>Spring Boot CLI &#x662F;&#x4E00;&#x4E2A;&#x547D;&#x4EE4;&#x884C;&#x5DE5;&#x5177;&#xFF0C;&#x5982;&#x679C;&#x60A8;&#x60F3;&#x4F7F;&#x7528; Spring &#x5FEB;&#x901F;&#x642D;&#x5EFA;&#x539F;&#x578B;&#xFF0C;&#x53EF;&#x4EE5;&#x9009;&#x62E9;&#x5B83;&#x3002;&#x5B83;&#x5141;&#x8BB8;&#x60A8;&#x8FD0;&#x884C; <a href="http://groovy.codehaus.org/" target="_blank">Groovy</a> &#x811A;&#x672C;&#xFF0C;&#x8FD9;&#x610F;&#x5473;&#x7740;&#x60A8;&#x6709;&#x53EF;&#x4EE5;&#x6709;&#x7C7B; Java &#x8BED;&#x6CD5;&#x4E14;&#x6CA1;&#x6709;&#x592A;&#x591A;&#x6837;&#x677F;&#x7684;&#x4EE3;&#x7801;&#x3002;</p>
<p>&#x60A8;&#x4E0D;&#x9700;&#x8981;&#x4F7F;&#x7528; CLI &#x6765;&#x914D;&#x5408; Spring Boot&#xFF0C;&#x4F46;&#x5B83;&#x786E;&#x5B9E;&#x662F;&#x4E00;&#x4E2A;&#x5165;&#x95E8; Spring &#x5E94;&#x7528;&#x7684;&#x6700;&#x5FEB;&#x65B9;&#x5F0F;&#x3002;</p>
<p><a id="getting-started-manual-cli-installation"></a></p>
<h4 id="1021&#x3001;&#x624B;&#x52A8;&#x5B89;&#x88C5;">10.2.1&#x3001;&#x624B;&#x52A8;&#x5B89;&#x88C5;</h4>
<p>&#x60A8;&#x53EF;&#x4EE5;&#x4ECE; Spring &#x8F6F;&#x4EF6;&#x4ED3;&#x5E93;&#x4E2D;&#x4E0B;&#x8F7D; Spring CLI &#x53D1;&#x884C;&#x7248;&#xFF1A;</p>
<ul>
<li><a href="https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/1.5.9.RELEASE/spring-boot-cli-1.5.9.RELEASE-bin.zip" target="_blank">spring-boot-cli-1.5.9.RELEASE-bin.zip</a></li>
<li><a href="https://repo.spring.io/release/org/springframework/boot/spring-boot-cli/1.5.9.RELEASE/spring-boot-cli-1.5.9.RELEASE-bin.tar.gz" target="_blank">spring-boot-cli-1.5.9.RELEASE-bin.tar.gz</a></li>
</ul>
<p><a href="https://repo.spring.io/snapshot/org/springframework/boot/spring-boot-cli/" target="_blank">&#x6700;&#x65B0;&#x7684;&#x5FEB;&#x7167;&#x53D1;&#x884C;&#x7248;</a>&#x4E5F;&#x662F;&#x53EF;&#x7528;&#x7684;&#x3002;</p>
<p>&#x4E0B;&#x8F7D;&#x4E4B;&#x540E;&#xFF0C;&#x8BF7;&#x6309;&#x7167;&#x89E3;&#x538B;&#x7F29;&#x5F52;&#x6863;&#x6587;&#x4EF6;&#x4E2D;&#x7684; <a href="https://raw.github.com/spring-projects/spring-boot/v1.5.9.RELEASE/spring-boot-cli/src/main/content/INSTALL.txt" target="_blank">INSTALL.txt</a> &#x8BF4;&#x660E;&#x8FDB;&#x884C;&#x64CD;&#x4F5C;&#x3002;&#x603B;&#x4E4B;&#xFF1A;&#x5728; <code>.zip</code> &#x6587;&#x4EF6;&#x7684; <code>bin/</code> &#x76EE;&#x5F55;&#x4E2D;&#x6709;&#x4E00;&#x4E2A; spring &#x811A;&#x672C;&#xFF08;&#x5728; Windows &#x4E0B;&#x4E3A; <code>spring.bat</code>&#xFF09;&#xFF0C;&#x6216;&#x8005;&#x4E5F;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>java -jar</code> &#x914D;&#x5408; <code>.jar</code> &#x6587;&#x4EF6;&#xFF08;&#x8BE5;&#x811A;&#x672C;&#x53EF;&#x4EE5;&#x5E2E;&#x52A9;&#x60A8;&#x786E;&#x4FDD; classpath &#x8BBE;&#x7F6E;&#x6B63;&#x786E;&#xFF09;&#x3002;</p>
<p><a id="getting-started-sdkman-cli-installation"></a></p>
<h4 id="1022&#x3001;&#x4F7F;&#x7528;-sdkman-&#x5B89;&#x88C5;">10.2.2&#x3001;&#x4F7F;&#x7528; SDKMAN! &#x5B89;&#x88C5;</h4>
<p>SDKMAN!&#xFF08;&#x8F6F;&#x4EF6;&#x5F00;&#x53D1;&#x5305;&#x7BA1;&#x7406;&#x5668;&#xFF09;&#x7528;&#x4E8E;&#x7BA1;&#x7406;&#x4E8C;&#x8FDB;&#x5236; SDK &#x7684;&#x591A;&#x4E2A;&#x7248;&#x672C;&#xFF0C;&#x5305;&#x62EC; Groovy &#x548C; Spring Boot CLI&#x3002;&#x4ECE; <a href="http://sdkman.io/" target="_blank">sdkman.io</a> &#x83B7;&#x53D6; SDKMAN! &#x5E76;&#x5B89;&#x88C5; Spring Boot&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">$ sdk <span class="token function">install</span> springboot
$ spring --version
Spring Boot v1.5.9.RELEASE
</code></pre>
<p>&#x5982;&#x679C;&#x60A8;&#x6B63;&#x5728;&#x4E3A; CLI &#x5F00;&#x53D1;&#x529F;&#x80FD;&#xFF0C;&#x5E76;&#x5E0C;&#x671B;&#x591F;&#x80FD;&#x8F7B;&#x677E;&#x5730;&#x8BBF;&#x95EE;&#x521A;&#x521B;&#x5EFA;&#x7684;&#x7248;&#x672C;&#xFF0C;&#x8BF7;&#x53C2;&#x7167;&#x4EE5;&#x4E0B;&#x6307;&#x4EE4;&#x3002;</p>
<pre class="language-"><code class="lang-bash">$ sdk <span class="token function">install</span> springboot dev /path/to/spring-boot/spring-boot-cli/target/spring-boot-cli-1.5.9.RELEASE-bin/spring-1.5.9.RELEASE/
$ sdk default springboot dev
$ spring --version
Spring CLI v1.5.9.RELEASE
</code></pre>
<p>&#x4EE5;&#x4E0A;&#x64CD;&#x4F5C;&#x5C06;&#x4F1A;&#x5B89;&#x88C5;&#x4E00;&#x4E2A;&#x540D;&#x4E3A; <code>dev</code> &#x7684; <code>spring</code> &#x7684;&#x672C;&#x5730;&#x5B9E;&#x4F8B;&#x3002;&#x5B83;&#x6307;&#x5411;&#x60A8;&#x7684;&#x76EE;&#x6807;&#x6784;&#x5EFA;&#x4F4D;&#x7F6E;&#xFF0C;&#x56E0;&#x6B64;&#x6BCF;&#x6B21;&#x91CD;&#x65B0;&#x6784;&#x5EFA; Spring Boot &#x65F6;&#xFF0C;spring &#x90FD;&#x662F;&#x6700;&#x65B0;&#x7684;&#x3002;</p>
<p>&#x60A8;&#x53EF;&#x4EE5;&#x8FD9;&#x6837;&#x505A;&#x6765;&#x76F8;&#x5173;&#x4FE1;&#x606F;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">$ sdk <span class="token function">ls</span> springboot

<span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span>
Available Springboot Versions
<span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span>
<span class="token operator">&gt;</span> + dev
* <span class="token number">1.5</span>.9.RELEASE

<span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span>
+ - <span class="token builtin class-name">local</span> version
* - installed
<span class="token operator">&gt;</span> - currently <span class="token keyword">in</span> use
<span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span><span class="token operator">==</span>
</code></pre>
<p><a id="getting-started-homebrew-cli-installation"></a></p>
<h4 id="1023&#x3001;&#x4F7F;&#x7528;-osx-homebrew-&#x5B89;&#x88C5;">10.2.3&#x3001;&#x4F7F;&#x7528; OSX Homebrew &#x5B89;&#x88C5;</h4>
<p>&#x5982;&#x679C;&#x60A8;&#x662F;&#x5728; Mac &#x4E0A;&#x5DE5;&#x4F5C;&#x5E76;&#x4E14;&#x4F7F;&#x7528;&#x4E86; <a href="http://brew.sh/" target="_blank">Homebrew</a>&#xFF0C;&#x60A8;&#x5B89;&#x88C5; Spring Boot CLI &#x9700;&#x8981;&#x505A;&#x7684;:</p>
<pre class="language-"><code class="lang-bash">$ brew tap pivotal/tap
$ brew <span class="token function">install</span> springboot
</code></pre>
<p>Homebrew &#x5C06;&#x4F1A;&#x628A; spring &#x5B89;&#x88C5;&#x5728; <code>/usr/local/bin</code>&#x3002;</p>
<p><strong>&#x6CE8;&#x610F;</strong></p>
<blockquote>
<p>&#x5982;&#x679C;&#x60A8;&#x6CA1;&#x6709;&#x770B;&#x5230;&#x6267;&#x884C;&#x6D41;&#x7A0B;, &#x60A8;&#x5B89;&#x88C5;&#x7684; brew &#x53EF;&#x80FD;&#x5DF2;&#x7ECF;&#x8FC7;&#x671F;&#x4E86;&#x3002;&#x6267;&#x884C; <code>brew update</code> &#x5E76;&#x91CD;&#x65B0;&#x5C1D;&#x8BD5;&#x3002;</p>
</blockquote>
<p><a id="getting-started-macports-cli-installation"></a></p>
<h4 id="1024&#x3001;&#x4F7F;&#x7528;-macports-&#x5B89;&#x88C5;">10.2.4&#x3001;&#x4F7F;&#x7528; MacPorts &#x5B89;&#x88C5;</h4>
<p>&#x5982;&#x679C;&#x60A8;&#x662F;&#x5728; Mac &#x4E0A;&#x5DE5;&#x4F5C;&#x5E76;&#x4E14;&#x4F7F;&#x7528;&#x4E86; <a href="https://www.macports.org/" target="_blank">MacPorts</a>&#xFF0C;&#x60A8;&#x5B89;&#x88C5; Spring Boot CLI &#x6240;&#x9700;&#x8981;&#x505A;&#x7684;:</p>
<pre class="language-"><code class="lang-bash">$ <span class="token function">sudo</span> port <span class="token function">install</span> spring-boot-cli
</code></pre>
<p><a id="getting-started-cli-command-line-completion"></a></p>
<h4 id="1025&#x3001;&#x547D;&#x4EE4;&#x884C;&#x5B8C;&#x6210;">10.2.5&#x3001;&#x547D;&#x4EE4;&#x884C;&#x5B8C;&#x6210;</h4>
<p>Spring Boot CLI &#x4E3A; <a href="https://en.wikipedia.org/wiki/Bash_%28Unix_shell%29" target="_blank">BASH</a> &#x548C; <a href="https://en.wikipedia.org/wiki/Zsh" target="_blank">zsh</a> &#x63D0;&#x4F9B;&#x4E86;&#x547D;&#x4EE4;&#x5B8C;&#x6210;&#x811A;&#x672C;&#x3002;&#x60A8;&#x53EF;&#x4EE5;&#x5728;&#x4EFB;&#x4F55; shell &#x4E2D;&#x6267;&#x884C;&#x6B64;&#x811A;&#x672C; (&#x4E5F;&#x79F0;&#x4E3A; <code>spring</code>&#xFF09;&#xFF0C;&#x6216;&#x5C06;&#x5176;&#x653E;&#x5728;&#x60A8;&#x4E2A;&#x4EBA;&#x6216;&#x7CFB;&#x7EDF;&#x8303;&#x56F4;&#x7684; bash &#x4E2D;&#x5B8C;&#x6210;&#x521D;&#x59CB;&#x5316;&#x3002;&#x5728; Debian &#x7CFB;&#x7EDF;&#x4E0A;&#xFF0C;&#x7CFB;&#x7EDF;&#x8303;&#x56F4;&#x7684;&#x811A;&#x672C;&#x4F4D;&#x4E8E; <code>/shell-completion/bash</code> &#x4E2D;&#xFF0C;&#x5F53;&#x65B0;&#x7684; shell &#x542F;&#x52A8;&#x65F6;&#xFF0C;&#x8BE5;&#x76EE;&#x5F55;&#x4E2D;&#x7684;&#x6240;&#x6709;&#x811A;&#x672C;&#x5C06;&#x88AB;&#x6267;&#x884C;&#x3002;&#x8981;&#x624B;&#x52A8;&#x8FD0;&#x884C;&#x811A;&#x672C;, &#x4F8B;&#x5982;&#xFF1A;&#x60A8;&#x5DF2;&#x7ECF;&#x4F7F;&#x7528; SDKMAN! &#x5B89;&#x88C5;&#x4E86;</p>
<pre class="language-"><code class="lang-bash">$ <span class="token builtin class-name">.</span> ~/.sdkman/candidates/springboot/current/shell-completion/bash/spring
$ spring <span class="token operator">&lt;</span>HIT TAB HERE<span class="token operator">&gt;</span>
  grab  <span class="token builtin class-name">help</span>  jar  run  <span class="token builtin class-name">test</span>  version
</code></pre>
<p><strong>&#x6CE8;&#x610F;</strong></p>
<blockquote>
<p>&#x5982;&#x679C;&#x60A8;&#x4F7F;&#x7528; Homebrew &#x6216;&#x8005; MacPorts &#x5B89;&#x88C5;&#x4E86; Spring Boot CLI&#xFF0C;&#x5219;&#x547D;&#x4EE4;&#x884C;&#x5B8C;&#x6210;&#x811A;&#x672C;&#x5C06;&#x81EA;&#x52A8;&#x6CE8;&#x518C;&#x5230;&#x60A8;&#x7684; shell &#x4E2D;&#x3002;</p>
</blockquote>
<p><a id="getting-started-cli-example"></a></p>
<h3 id="1026&#x3001;&#x5FEB;&#x901F;&#x5165;&#x95E8;-spring-cli-&#x793A;&#x4F8B;">10.2.6&#x3001;&#x5FEB;&#x901F;&#x5165;&#x95E8; Spring CLI &#x793A;&#x4F8B;</h3>
<p>&#x8FD9;&#x662F;&#x4E00;&#x4E2A;&#x975E;&#x5E38;&#x7B80;&#x5355;&#x7684; web &#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#xFF0C;&#x53EF;&#x4EE5;&#x7528;&#x4E8E;&#x6D4B;&#x8BD5;&#x60A8;&#x7684;&#x5B89;&#x88C5;&#x60C5;&#x51B5;&#x3002;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x540D;&#x4E3A; <code>app.groovy</code> &#x7684;&#x6587;&#x4EF6;&#xFF1A;</p>
<pre class="language-"><code class="lang-groovy"><span class="token annotation punctuation">@RestController</span>
<span class="token keyword">class</span> <span class="token class-name">ThisWillActuallyRun</span> <span class="token punctuation">{</span>

    <span class="token annotation punctuation">@RequestMapping</span><span class="token punctuation">(</span><span class="token string">&quot;/&quot;</span><span class="token punctuation">)</span>
    String <span class="token function">home</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token string">&quot;Hello World!&quot;</span>
    <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
</code></pre>
<p>&#x4E4B;&#x540E;&#x5728; shell &#x4E2D;&#x8FD0;&#x884C;&#x5B83;&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">$ spring run app.groovy
</code></pre>
<p><strong>&#x6CE8;&#x610F;</strong></p>
<blockquote>
<p>&#x7B2C;&#x4E00;&#x6B21;&#x8FD0;&#x884C;&#x5E94;&#x7528;&#x7684;&#x65F6;&#x5019;&#x9700;&#x8981;&#x4E00;&#x4E9B;&#x65F6;&#x95F4;&#xFF0C;&#x56E0;&#x4E3A;&#x9700;&#x8981;&#x4E0B;&#x8F7D;&#x4F9D;&#x8D56;&#x3002;&#x540E;&#x7EED;&#x8FD0;&#x884C;&#x5C06;&#x4F1A;&#x66F4;&#x5FEB;&#x3002;</p>
</blockquote>
<p>&#x5728;&#x60A8;&#x559C;&#x6B22;&#x7684;&#x6D4F;&#x89C8;&#x5668;&#x4E2D;&#x6253;&#x5F00; localhost:8080&#xFF0C;&#x60A8;&#x5E94;&#x8BE5;&#x4F1A;&#x770B;&#x5230;&#x4EE5;&#x4E0B;&#x8F93;&#x51FA;&#xFF1A;</p>
<pre class="language-"><code>Hello World!
</code></pre><p><a id="getting-started-upgrading-from-an-earlier-version"></a></p>
<h2 id="103&#x3001;&#x5347;&#x7EA7;&#x65E7;&#x7248;-spring-boot">10.3&#x3001;&#x5347;&#x7EA7;&#x65E7;&#x7248; Spring Boot</h2>
<p>&#x5982;&#x679C;&#x60A8;&#x60F3;&#x4ECE;&#x65E7;&#x7248;&#x7684; Spring Boot &#x5347;&#x7EA7;&#x5230;&#x6B64;&#x7248;&#x672C;&#xFF0C;&#x8BF7;&#x67E5;&#x770B;<a href="https://github.com/spring-projects/spring-boot/wiki" target="_blank">&#x9879;&#x76EE; wiki</a> &#x4E0A;&#x6258;&#x7BA1;&#x7684; <strong>release notes&#xFF08;&#x53D1;&#x884C;&#x8BF4;&#x660E;&#xFF09;</strong>&#x3002;&#x60A8;&#x5C06;&#x4F1A;&#x627E;&#x5230;&#x5347;&#x7EA7;&#x8BF4;&#x660E;&#x4EE5;&#x53CA;&#x6BCF;&#x4E2A;&#x7248;&#x672C;&#x7684;<strong>&#x65B0;&#x7279;&#x6027;&#x548C;&#x6CE8;&#x610F;&#x4E8B;&#x9879;</strong>&#x5217;&#x8868;&#x3002;</p>
<p>&#x8981;&#x5347;&#x7EA7;&#x73B0;&#x6709;&#x7684; CLI&#xFF0C;&#x8BF7;&#x4F7F;&#x7528;&#x76F8;&#x5E94;&#x7684;&#x5305;&#x7BA1;&#x7406;&#x5668;&#x547D;&#x4EE4;&#xFF08;&#x4F8B;&#x5982; <code>brew upgrade</code>&#xFF09; &#x6216;&#x8005;, &#x5982;&#x679C;&#x60A8;&#x624B;&#x52A8;&#x5B89;&#x88C5;&#x4E86; CLI&#xFF0C;&#x8BF7;&#x6309;&#x7167;<a href="#getting-started-manual-cli-installation">&#x6807;&#x51C6;&#x8BF4;&#x660E;</a>&#xFF0C;&#x8BB0;&#x5F97;&#x66F4;&#x65B0;&#x60A8;&#x7684; <code>PATH</code> &#x73AF;&#x5883;&#x53D8;&#x91CF;&#x4EE5;&#x5220;&#x9664;&#x4EFB;&#x4F55;&#x65E7;&#x7684;&#x5F15;&#x7528;&#x3002;</p>
<p><a id="getting-started-first-application"></a></p>
<h2 id="11&#x3001;&#x5F00;&#x53D1;&#x7B2C;&#x4E00;&#x4E2A;-spring-boot-&#x5E94;&#x7528;">11&#x3001;&#x5F00;&#x53D1;&#x7B2C;&#x4E00;&#x4E2A; Spring Boot &#x5E94;&#x7528;</h2>
<p>&#x8BA9;&#x6211;&#x4EEC;&#x4F7F;&#x7528; Java &#x5F00;&#x53D1;&#x4E00;&#x4E2A;&#x7B80;&#x5355;&#x7684; <strong>Hello World!</strong> web &#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#xFF0C;&#x4EE5;&#x4FBF;&#x4F53;&#x73B0; Spring Boot &#x7684;&#x4E00;&#x4E9B;&#x5173;&#x952E;&#x7279;&#x6027;&#x3002;&#x6211;&#x4EEC;&#x5C06;&#x4F7F;&#x7528; Maven &#x6784;&#x5EFA;&#x8BE5;&#x9879;&#x76EE;&#xFF0C;&#x56E0;&#x4E3A;&#x5927;&#x591A;&#x6570; IDE &#x90FD;&#x652F;&#x6301;&#x5B83;&#x3002;</p>
<p><strong>&#x63D0;&#x793A;</strong></p>
<blockquote>
<p><a href="https://spring.io/" target="_blank">spring.io</a> &#x7F51;&#x7AD9;&#x4E0A;&#x6709;&#x8BB8;&#x591A;&#x4F7F;&#x7528; Spring Boot &#x7684;<strong>&#x5165;&#x95E8;&#x6307;&#x5357;</strong>&#xFF0C;&#x5982;&#x679C;&#x60A8;&#x6B63;&#x5728;&#x5BFB;&#x627E;&#x5177;&#x4F53;&#x95EE;&#x9898;&#x7684;&#x89E3;&#x51B3;&#x65B9;&#x6848;&#xFF0C;&#x53EF;&#x5148;&#x4ECE;&#x4E0A;&#x9762;&#x5BFB;&#x627E;&#x3002;&#x60A8;&#x53EF;&#x4EE5;&#x5230; <a href="https://start.spring.io/" target="_blank">start.spring.io</a> &#x4F7F;&#x7528;&#x4F9D;&#x8D56;&#x641C;&#x7D22;&#x529F;&#x80FD;&#x9009;&#x62E9; <code>web</code> starter &#x6765;&#x5FEB;&#x901F;&#x5B8C;&#x6210;&#x4EE5;&#x4E0B;&#x6B65;&#x9AA4;&#x3002;&#x5B83;&#x5C06;&#x81EA;&#x52A8;&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x9879;&#x76EE;&#x7ED3;&#x6784;&#xFF0C;&#x4EE5;&#x4FBF;&#x60A8;&#x53EF;&#x4EE5;<a href="#getting-started-first-application-code">&#x7ACB;&#x5373;&#x5F00;&#x59CB;&#x7F16;&#x7801;</a>&#x3002;<a href="https://github.com/spring-io/initializr" target="_blank">&#x67E5;&#x770B;&#x6587;&#x6863;&#x4E86;&#x89E3;&#x66F4;&#x591A;&#x4FE1;&#x606F;</a>&#x3002;</p>
</blockquote>
<p>&#x5728;&#x5F00;&#x59CB;&#x4E4B;&#x524D;&#xFF0C;&#x6253;&#x5F00;&#x7EC8;&#x7AEF;&#x68C0;&#x67E5;&#x60A8;&#x662F;&#x5426;&#x5B89;&#x88C5;&#x4E86;&#x7B26;&#x5408;&#x8981;&#x6C42;&#x7684; Java &#x7248;&#x672C;&#x548C; Maven &#x7248;&#x672C;&#x3002;</p>
<pre class="language-"><code class="lang-bash">$ java -version
java version <span class="token string">&quot;1.7.0_51&quot;</span>
Java<span class="token punctuation">(</span>TM<span class="token punctuation">)</span> SE Runtime Environment <span class="token punctuation">(</span>build <span class="token number">1.7</span>.0_51-b13<span class="token punctuation">)</span>
Java HotSpot<span class="token punctuation">(</span>TM<span class="token punctuation">)</span> <span class="token number">64</span>-Bit Server VM <span class="token punctuation">(</span>build <span class="token number">24.51</span>-b03, mixed mode<span class="token punctuation">)</span>
</code></pre>
<pre class="language-"><code class="lang-bash">$ mvn -v
Apache Maven <span class="token number">3.2</span>.3 <span class="token punctuation">(</span>33f8c3e1027c3ddde99d3cdebad2656a31e8fdf4<span class="token punctuation">;</span> <span class="token number">2014</span>-08-11T13:58:10-07:00<span class="token punctuation">)</span>
Maven home: /Users/user/tools/apache-maven-3.1.1
Java version: <span class="token number">1.7</span>.0_51, vendor: Oracle Corporation
</code></pre>
<p><strong>&#x63D0;&#x793A;</strong></p>
<blockquote>
<p>&#x6B64;&#x793A;&#x4F8B;&#x9700;&#x8981;&#x5728;&#x60A8;&#x81EA;&#x5DF1;&#x7684;&#x6587;&#x4EF6;&#x5939;&#x4E2D;&#x521B;&#x5EFA;&#xFF0C;&#x540E;&#x7EED;&#x7684;&#x6B65;&#x9AA4;&#x8BF4;&#x660E;&#x5047;&#x8BBE;&#x60A8;&#x5DF2;&#x7ECF;&#x521B;&#x5EFA;&#x4E86;&#x8FD9;&#x4E2A;&#x6587;&#x4EF6;&#x5939;&#xFF0C;&#x5B83;&#x662F;&#x60A8;&#x7684;<strong>&#x5F53;&#x524D;&#x76EE;&#x5F55;</strong>&#x3002;</p>
</blockquote>
<p><a id="getting-started-first-application-pom"></a></p>
<h3 id="111-&#x521B;&#x5EFA;-pom">11.1 &#x521B;&#x5EFA; POM</h3>
<p>&#x6211;&#x4EEC;&#x5148;&#x8981;&#x521B;&#x5EFA;&#x4E00;&#x4E2A; Maven <code>pom.xml</code> &#x6587;&#x4EF6;&#x3002;<code>pom.xml</code> &#x662F;&#x7528;&#x4E8E;&#x6784;&#x5EFA;&#x9879;&#x76EE;&#x7684;<strong>&#x914D;&#x65B9;</strong>&#x3002;&#x6253;&#x5F00;&#x60A8;&#x6700;&#x559C;&#x6B22;&#x7684;&#x7F16;&#x8F91;&#x5668;&#x5E76;&#x6DFB;&#x52A0;&#x4E00;&#x4E0B;&#x5185;&#x5BB9;&#xFF1A;</p>
<pre class="language-"><code class="lang-xml"><span class="token prolog">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;</span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>project</span> <span class="token attr-name">xmlns</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>http://maven.apache.org/POM/4.0.0<span class="token punctuation">&quot;</span></span> <span class="token attr-name"><span class="token namespace">xmlns:</span>xsi</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>http://www.w3.org/2001/XMLSchema-instance<span class="token punctuation">&quot;</span></span>
    <span class="token attr-name"><span class="token namespace">xsi:</span>schemaLocation</span><span class="token attr-value"><span class="token punctuation">=</span><span class="token punctuation">&quot;</span>http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd<span class="token punctuation">&quot;</span></span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>modelVersion</span><span class="token punctuation">&gt;</span></span>4.0.0<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>modelVersion</span><span class="token punctuation">&gt;</span></span>

    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>com.example<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>myproject<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>0.0.1-SNAPSHOT<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>

    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>parent</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>org.springframework.boot<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>spring-boot-starter-parent<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>version</span><span class="token punctuation">&gt;</span></span>1.5.9.RELEASE<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>version</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>parent</span><span class="token punctuation">&gt;</span></span>

    <span class="token comment">&lt;!-- Additional lines to be added here... --&gt;</span>

<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>project</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p>&#x8FD9;&#x5E94;&#x8BE5;&#x4F1A;&#x7ED9;&#x60A8;&#x751F;&#x6210;&#x4E00;&#x4E2A;&#x5DE5;&#x4F5C;&#x7248;&#x672C;&#xFF0C;&#x60A8;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x8FD0;&#x884C; <code>mvn package</code> &#x6765;&#x6D4B;&#x8BD5;&#x5B83;&#xFF08;&#x6B64;&#x65F6;&#x60A8;&#x53EF;&#x4EE5;&#x5FFD;&#x7565; <strong>jar will be empty - no content was marked for inclusion!</strong> &#x8B66;&#x544A;&#x4FE1;&#x606F;)&#x3002;</p>
<p><strong>&#x6CE8;&#x610F;</strong></p>
<blockquote>
<p>&#x6B64;&#x65F6;&#xFF0C;&#x60A8;&#x53EF;&#x4EE5;&#x5C06;&#x9879;&#x76EE;&#x5BFC;&#x5165; IDE&#xFF08;&#x5927;&#x90E8;&#x5206;&#x7684;&#x73B0;&#x4EE3; Java IDE &#x90FD;&#x5185;&#x7F6E; Maven &#x652F;&#x6301;&#xFF09;&#x3002;&#x4E3A;&#x4E86;&#x7B80;&#x5355;&#x8D77;&#x89C1;&#xFF0C;&#x6211;&#x4EEC;&#x5C06;&#x7EE7;&#x7EED;&#x5728;&#x8FD9;&#x4E2A;&#x4F8B;&#x5B50;&#x4E2D;&#x4F7F;&#x7528;&#x7EAF;&#x6587;&#x672C;&#x7F16;&#x8F91;&#x5668;&#x3002;</p>
</blockquote>
<p><a id="getting-started-first-application-dependencies"></a></p>
<h3 id="112&#x3001;&#x6DFB;&#x52A0;-classpath-&#x4F9D;&#x8D56;">11.2&#x3001;&#x6DFB;&#x52A0; Classpath &#x4F9D;&#x8D56;</h3>
<p>Spring Boot &#x63D0;&#x4F9B;&#x4E86;&#x591A;&#x4E2A; &#x201C;Starter&#x201D;&#xFF0C;&#x53EF;&#x4EE5;&#x8BA9;&#x60A8;&#x65B9;&#x4FBF;&#x5730;&#x5C06; jar &#x6DFB;&#x52A0;&#x5230; classpath &#x4E0B;&#x3002;&#x6211;&#x4EEC;&#x7684;&#x793A;&#x4F8B;&#x5E94;&#x7528;&#x5DF2;&#x7ECF;&#x5728; POM &#x7684; <code>parent</code> &#x90E8;&#x5206;&#x4F7F;&#x7528;&#x4E86; <code>spring-boot-starter-parent</code>&#x3002;<code>spring-boot-starter-parent</code> &#x662F;&#x4E00;&#x4E2A;&#x7279;&#x6B8A; Starter&#xFF0C;&#x5B83;&#x63D0;&#x4F9B;&#x4E86;&#x6709;&#x7528;&#x7684; Maven &#x9ED8;&#x8BA4;&#x914D;&#x7F6E;&#x3002;&#x6B64;&#x5916;&#x5B83;&#x8FD8;&#x63D0;&#x4F9B;&#x4E86;<a href="#using-boot-dependency-management">&#x4F9D;&#x8D56;&#x7BA1;&#x7406;</a>&#x529F;&#x80FD;&#xFF0C;&#x60A8;&#x53EF;&#x4EE5;&#x5FFD;&#x7565;&#x8FD9;&#x4E9B;&#x4F9D;&#x8D56;&#x7684;&#x7248;&#x672C;&#xFF08;<code>version</code>&#xFF09;&#x6807;&#x7B7E;&#x3002;</p>
<p>&#x5176;&#x4ED6; Starter &#x53EA;&#x63D0;&#x4F9B;&#x5728;&#x5F00;&#x53D1;&#x7279;&#x5B9A;&#x5E94;&#x7528;&#x65F6;&#x53EF;&#x80FD;&#x9700;&#x8981;&#x5230;&#x7684;&#x4F9D;&#x8D56;&#x3002;&#x7531;&#x4E8E;&#x6211;&#x4EEC;&#x6B63;&#x5728;&#x5F00;&#x53D1;&#x4E00;&#x4E2A; web &#x5E94;&#x7528;&#xFF0C;&#x56E0;&#x6B64;&#x6211;&#x4EEC;&#x5C06;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A; <code>spring-boot-starter-web</code> &#x4F9D;&#x8D56;&#x2009;&#xFF0C;&#x2009;&#x4F46;&#x5728;&#x6B64;&#x4E4B;&#x524D;&#xFF0C;&#x8BA9;&#x6211;&#x4EEC;&#x6765;&#x770B;&#x770B;&#x76EE;&#x524D;&#x62E5;&#x6709;&#x7684;&#x3002;</p>
<pre class="language-"><code>mvn dependency:tree

[INFO] com.example:myproject:jar:0.0.1-SNAPSHOT
</code></pre><p><code>mvn dependency:tree</code> &#x547D;&#x4EE4;&#x4EE5;&#x6811;&#x7684;&#x5F62;&#x5F0F;&#x6253;&#x5370;&#x9879;&#x76EE;&#x7684;&#x4F9D;&#x8D56;&#x3002;&#x60A8;&#x53EF;&#x4EE5;&#x770B;&#x5230; <code>spring-boot-starter-parent</code> &#x672C;&#x8EAB;&#x4E0D;&#x63D0;&#x4F9B;&#x4F9D;&#x8D56;&#x3002;&#x6211;&#x4EEC;&#x53EF;&#x4EE5;&#x5728; <code>parent</code> &#x4E0B;&#x65B9;&#x7ACB;&#x5373;&#x7F16;&#x8F91; <code>pom.xml</code> &#x5E76;&#x6DFB;&#x52A0; <code>spring-boot-starter-web</code> &#x4F9D;&#x8D56;&#xFF1A;</p>
<pre class="language-"><code class="lang-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependencies</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>dependency</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>org.springframework.boot<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>spring-boot-starter-web<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependency</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>dependencies</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p>&#x5982;&#x679C;&#x60A8;&#x518D;&#x6B21;&#x8FD0;&#x884C; <code>mvn dependency:tree</code>&#xFF0C;&#x5C06;&#x4F1A;&#x770B;&#x5230;&#x73B0;&#x5728;&#x6709;&#x8BB8;&#x591A;&#x9644;&#x52A0;&#x7684;&#x4F9D;&#x8D56;&#xFF0C;&#x5305;&#x62EC;&#x4E86; Tomcat web &#x670D;&#x52A1;&#x5668;&#x548C; Spring Boot &#x672C;&#x8EAB;&#x3002;</p>
<p><a id="getting-started-first-application-code"></a></p>
<h3 id="113&#x3001;&#x7F16;&#x7801;">11.3&#x3001;&#x7F16;&#x7801;</h3>
<p>&#x8981;&#x5B8C;&#x6210;&#x6211;&#x4EEC;&#x7684;&#x5E94;&#x7528;&#xFF0C;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x521B;&#x5EFA;&#x4E00;&#x4E2A; Java &#x6587;&#x4EF6;&#x3002;&#x9ED8;&#x8BA4;&#x60C5;&#x51B5;&#x4E0B;&#xFF0C;Maven &#x5C06;&#x4ECE; <code>src/main/java</code> &#x76EE;&#x5F55;&#x4E0B;&#x7F16;&#x8BD1;&#x6E90;&#x4EE3;&#x7801;&#xFF0C;&#x56E0;&#x6B64;&#x60A8;&#x9700;&#x8981;&#x521B;&#x5EFA;&#x8BE5;&#x6587;&#x4EF6;&#x5939;&#x7ED3;&#x6784;&#xFF0C;&#x4E4B;&#x540E;&#x6DFB;&#x52A0;&#x4E00;&#x4E2A;&#x540D;&#x4E3A; <code>src/main/java/Example.java</code> &#x7684;&#x6587;&#x4EF6;&#xFF1A;</p>
<pre class="language-"><code class="lang-java"><span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot</span><span class="token punctuation">.</span>*<span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>boot<span class="token punctuation">.</span>autoconfigure</span><span class="token punctuation">.</span>*<span class="token punctuation">;</span>
<span class="token keyword">import</span> <span class="token namespace">org<span class="token punctuation">.</span>springframework<span class="token punctuation">.</span>web<span class="token punctuation">.</span>bind<span class="token punctuation">.</span>annotation</span><span class="token punctuation">.</span>*<span class="token punctuation">;</span>

<span class="token annotation punctuation">@RestController</span>
<span class="token annotation punctuation">@EnableAutoConfiguration</span>
<span class="token keyword">public</span> <span class="token keyword">class</span> <span class="token class-name">Example</span> <span class="token punctuation">{</span>

    <span class="token annotation punctuation">@RequestMapping</span><span class="token punctuation">(</span><span class="token string">&quot;/&quot;</span><span class="token punctuation">)</span>
    <span class="token class-name">String</span> <span class="token function">home</span><span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token string">&quot;Hello World!&quot;</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

    <span class="token keyword">public</span> <span class="token keyword">static</span> <span class="token keyword">void</span> <span class="token function">main</span><span class="token punctuation">(</span><span class="token class-name">String</span><span class="token punctuation">[</span><span class="token punctuation">]</span> args<span class="token punctuation">)</span> <span class="token keyword">throws</span> <span class="token class-name">Exception</span> <span class="token punctuation">{</span>
        <span class="token class-name">SpringApplication</span><span class="token punctuation">.</span><span class="token function">run</span><span class="token punctuation">(</span><span class="token class-name">Example</span><span class="token punctuation">.</span><span class="token keyword">class</span><span class="token punctuation">,</span> args<span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>

<span class="token punctuation">}</span>
</code></pre>
<p>&#x867D;&#x7136;&#x6CA1;&#x6709;&#x591A;&#x5C11;&#x4EE3;&#x7801;&#xFF0C;&#x4F46;&#x5B83;&#x4ECD;&#x7136;&#x505A;&#x4E86;&#x5F88;&#x591A;&#x4E8B;&#x60C5;&#x3002;&#x8BA9;&#x6211;&#x4EEC;&#x770B;&#x770B;&#x91CC;&#x9762;&#x91CD;&#x8981;&#x7684;&#x90E8;&#x5206;&#x3002;</p>
<p><a id="getting-started-first-application-annotations"></a></p>
<h4 id="1131&#x3001;restcontroller-&#x4E0E;-requestmapping-&#x6CE8;&#x89E3;">11.3.1&#x3001;@RestController &#x4E0E; @RequestMapping &#x6CE8;&#x89E3;</h4>
<p><code>Example</code> &#x7C7B;&#x4E2D;&#x7684;&#x7B2C;&#x4E00;&#x4E2A;&#x6CE8;&#x89E3;&#x662F; <code>@RestController</code>&#xFF0C;&#x8BE5;&#x6CE8;&#x89E3;&#x88AB;&#x79F0;&#x4F5C; stereotype &#x6CE8;&#x89E3;&#x3002;&#x5B83;&#x80FD;&#x4E3A;&#x4EE3;&#x7801;&#x9605;&#x8BFB;&#x8005;&#x63D0;&#x4F9B;&#x4E00;&#x4E9B;&#x63D0;&#x793A;&#xFF0C;&#x5BF9;&#x4E8E; Spring &#x800C;&#x8A00;&#xFF0C;&#x8FD9;&#x4E2A;&#x7C7B;&#x5177;&#x6709;&#x7279;&#x6B8A;&#x4F5C;&#x7528;&#x3002;&#x5728;&#x672C;&#x793A;&#x4F8B;&#x4E2D;&#xFF0C;&#x6211;&#x4EEC;&#x7684;&#x7C7B;&#x662F;&#x4E00;&#x4E2A; web <code>@Controller</code>&#xFF0C;&#x56E0;&#x6B64; Spring &#x5728;&#x5904;&#x7406;&#x4F20;&#x5165;&#x7684; web &#x8BF7;&#x6C42;&#x65F6;&#x4F1A;&#x8003;&#x8651;&#x5B83;&#x3002;</p>
<p><code>@RequestMapping</code> &#x6CE8;&#x89E3;&#x63D0;&#x4F9B;&#x4E86; <strong>routing</strong>&#xFF08;&#x8DEF;&#x7531;&#xFF09;&#x4FE1;&#x606F;&#x3002;&#x5B83;&#x544A;&#x8BC9; Spring&#xFF0C;&#x4EFB;&#x4F55;&#x5177;&#x6709;&#x8DEF;&#x5F84;&#x4E3A; <code>/</code> &#x7684; HTTP &#x8BF7;&#x6C42;&#x90FD;&#x5E94;&#x6620;&#x5C04;&#x5230; <code>home</code> &#x65B9;&#x6CD5;&#x3002;<code>@RestController</code> &#x6CE8;&#x89E3;&#x544A;&#x77E5; Spring &#x6E32;&#x67D3;&#x7ED3;&#x679C;&#x5B57;&#x7B26;&#x4E32;&#x76F4;&#x63A5;&#x8FD4;&#x56DE;&#x7ED9;&#x8C03;&#x7528;&#x8005;&#x3002;</p>
<p><strong>&#x63D0;&#x793A;</strong></p>
<blockquote>
<p><code>@RestController</code> &#x548C; <code>@RequestMapping</code> &#x662F; Spring MVC &#x6CE8;&#x89E3;&#xFF08;&#x5B83;&#x4EEC;&#x4E0D;&#x662F; Spring Boot &#x7279;&#x6709;&#x7684;&#xFF09;&#x3002;&#x6709;&#x5173;&#x66F4;&#x591A;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605; Spring &#x53C2;&#x8003;&#x6587;&#x6863;&#x4E2D;&#x7684; <a href="https://docs.spring.io/spring/docs/5.0.4.RELEASE/spring-framework-reference/web.html#mvc" target="_blank">MVC &#x7AE0;&#x8282;</a></p>
</blockquote>
<p><a id="getting-started-first-application-auto-configuration"></a></p>
<h4 id="1132&#x3001;enableautoconfiguration-&#x6CE8;&#x89E3;">11.3.2&#x3001;@EnableAutoConfiguration &#x6CE8;&#x89E3;</h4>
<p>&#x7B2C;&#x4E8C;&#x4E2A;&#x7C7B;&#x7EA7;&#x522B;&#x6CE8;&#x89E3;&#x662F; <code>@EnableAutoConfiguration</code>&#x3002;&#x6B64;&#x6CE8;&#x89E3;&#x544A;&#x77E5; Spring Boot &#x6839;&#x636E;&#x60A8;&#x6DFB;&#x52A0;&#x7684; jar &#x4F9D;&#x8D56;&#x6765;&#x201C;&#x731C;&#x6D4B;&#x201D;&#x60A8;&#x60F3;&#x5982;&#x4F55;&#x914D;&#x7F6E; Spring &#x5E76;&#x8FDB;&#x884C;&#x81EA;&#x52A8;&#x914D;&#x7F6E;&#xFF0C;&#x7531;&#x4E8E; <code>spring-boot-starter-web</code> &#x6DFB;&#x52A0;&#x4E86; Tomcat &#x548C; Spring MVC&#xFF0C;auto-configuration&#xFF08;&#x81EA;&#x52A8;&#x914D;&#x7F6E;&#xFF09;&#x5C06;&#x5047;&#x5B9A;&#x60A8;&#x8981;&#x5F00;&#x53D1; web &#x5E94;&#x7528;&#x5E76;&#x76F8;&#x5E94;&#x8BBE;&#x7F6E;&#x4E86; Spring&#x3002;</p>
<blockquote>
<p><strong>Starter &#x4E0E;&#x81EA;&#x52A8;&#x914D;&#x7F6E;</strong> <br> Auto-configuration &#x88AB;&#x8BBE;&#x8BA1;&#x4E0E; Starter &#x914D;&#x5408;&#x4F7F;&#x7528;&#xFF0C;&#x4F46;&#x8FD9;&#x4E24;&#x4E2A;&#x6982;&#x5FF5;&#x5E76;&#x4E0D;&#x662F;&#x76F4;&#x63A5;&#x76F8;&#x5173;&#x7684;&#x3002;&#x60A8;&#x53EF;&#x4EE5;&#x81EA;&#x7531;&#x9009;&#x62E9; starter &#x4E4B;&#x5916;&#x7684; jar &#x4F9D;&#x8D56;&#xFF0C;Spring Boot &#x4ECD;&#x7136;&#x4F1A;&#x81EA;&#x52A8;&#x914D;&#x7F6E;&#x60A8;&#x7684;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x3002;</p>
</blockquote>
<p><a id="getting-started-first-application-main-method"></a></p>
<h4 id="1133&#x3001;main-&#x65B9;&#x6CD5;">11.3.3&#x3001;main &#x65B9;&#x6CD5;</h4>
<p>&#x5E94;&#x7528;&#x7684;&#x6700;&#x540E;&#x4E00;&#x90E8;&#x5206;&#x662F; <code>main</code> &#x65B9;&#x6CD5;&#x3002;&#x8FD9;&#x53EA;&#x662F;&#x4E00;&#x4E2A;&#x6807;&#x51C6;&#x65B9;&#x6CD5;&#xFF0C;&#x5176;&#x9075;&#x5FAA; Java &#x89C4;&#x8303;&#x4E2D;&#x5B9A;&#x4E49;&#x7684;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x5165;&#x53E3;&#x70B9;&#x3002;&#x6211;&#x4EEC;&#x7684; main &#x65B9;&#x6CD5;&#x901A;&#x8FC7;&#x8C03;&#x7528; <code>run</code> &#x6765;&#x59D4;&#x6258; Spring Boot &#x7684; <code>SpringApplication</code> &#x7C7B;&#xFF0C;<code>SpringApplication</code> &#x7C7B;&#x5C06;&#x5F15;&#x5BFC;&#x6211;&#x4EEC;&#x7684;&#x5E94;&#x7528;&#xFF0C;&#x542F;&#x52A8; Spring&#xFF0C;&#x7136;&#x540E;&#x542F;&#x52A8;&#x81EA;&#x52A8;&#x914D;&#x7F6E;&#x7684; Tomcat web &#x670D;&#x52A1;&#x5668;&#x3002;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5C06; <code>Example.class</code>  &#x4F5C;&#x4E3A;&#x4E00;&#x4E2A;&#x53C2;&#x6570;&#x4F20;&#x9012;&#x7ED9; <code>run</code> &#x65B9;&#x6CD5;&#x6765;&#x544A;&#x77E5; <code>SpringApplication</code>&#xFF0C;&#x5B83;&#x662F; Spring &#x4E3B;&#x7EC4;&#x4EF6;&#x3002;&#x540C;&#x65F6;&#x8FD8;&#x4F20;&#x9012; <code>args</code> &#x6570;&#x7EC4;&#x4EE5;&#x66B4;&#x9732;&#x6240;&#x6709;&#x547D;&#x4EE4;&#x884C;&#x53C2;&#x6570;&#x3002;</p>
<p><a id="getting-started-first-application-run"></a></p>
<h3 id="114&#x3001;&#x8FD0;&#x884C;&#x793A;&#x4F8B;">11.4&#x3001;&#x8FD0;&#x884C;&#x793A;&#x4F8B;</h3>
<p>&#x6B64;&#x65F6;&#xFF0C;&#x6211;&#x4EEC;&#x7684;&#x5E94;&#x7528;&#x5E94;&#x8BE5;&#x662F;&#x53EF;&#x4EE5;&#x5DE5;&#x4F5C;&#x4E86;&#x3002;&#x7531;&#x4E8E;&#x60A8;&#x4F7F;&#x7528;&#x4E86; <code>spring-boot-starter-parent</code> POM&#xFF0C;&#x56E0;&#x6B64;&#x60A8;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>run</code> &#x6765;&#x542F;&#x52A8;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x3002;&#x5728;&#x6839;&#x76EE;&#x5F55;&#x4E0B;&#x8F93;&#x5165; <code>mvn spring-boot:run</code> &#x4EE5;&#x542F;&#x52A8;&#x5E94;&#x7528;&#xFF1A;</p>
<pre class="language-"><code>$ mvn spring-boot:run

  .   ____          _            __ _ _
 /\\ / ___&apos;_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | &apos;_ | &apos;_| | &apos;_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  &apos;  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::  (v2.0.0.RELEASE)
....... . . .
....... . . . (log output here)
....... . . .
........ Started Example in 2.222 seconds (JVM running for 6.514)
</code></pre><p>&#x5982;&#x679C;&#x60A8;&#x7528;&#x6D4F;&#x89C8;&#x5668;&#x6253;&#x5F00;&#x4E86; <a href="http://localhost:8080/" target="_blank"><code>localhost:8080</code></a>&#xFF0C;&#x60A8;&#x5E94;&#x8BE5;&#x4F1A;&#x770B;&#x5230;&#x4EE5;&#x4E0B;&#x8F93;&#x51FA;&#xFF1A;</p>
<pre class="language-"><code>Hello World!
</code></pre><p>&#x8981;&#x5E73;&#x6ED1;&#x9000;&#x51FA;&#x7A0B;&#x5E8F;&#xFF0C;&#x8BF7;&#x6309; <code>ctrl+c</code>&#x3002;</p>
<p><a id="getting-started-first-application-executable-jar"></a></p>
<h3 id="115&#x3001;&#x521B;&#x5EFA;&#x53EF;&#x6267;&#x884C;-jar">11.5&#x3001;&#x521B;&#x5EFA;&#x53EF;&#x6267;&#x884C; jar</h3>
<p>&#x6211;&#x4EEC;&#x901A;&#x8FC7;&#x521B;&#x5EFA;&#x4E00;&#x4E2A;&#x5B8C;&#x5168;&#x81EA;&#x5305;&#x542B;&#xFF08;self-contained&#xFF09;&#x7684;&#x53EF;&#x6267;&#x884C; jar &#x6587;&#x4EF6;&#x5B8C;&#x6210;&#x4E86;&#x793A;&#x4F8B;&#x3002;&#x8BE5; jar &#x6587;&#x4EF6;&#x53EF;&#x4EE5;&#x5728;&#x751F;&#x4EA7;&#x73AF;&#x5883;&#x4E2D;&#x8FD0;&#x884C;&#x3002;&#x53EF;&#x6267;&#x884C; jar&#xFF08;&#x6709;&#x65F6;&#x53C8;&#x79F0;&#x4E3A; <code>fat jars</code>&#xFF09;&#x662F;&#x5305;&#x542B;&#x4E86;&#x7F16;&#x8BD1;&#x540E;&#x7684;&#x7C7B;&#x4EE5;&#x53CA;&#x4EE3;&#x7801;&#x8FD0;&#x884C;&#x65F6;&#x6240;&#x9700;&#x8981;&#x76F8;&#x5173;&#x7684; jar &#x4F9D;&#x8D56;&#x7684;&#x5F52;&#x6863;&#x6587;&#x4EF6;&#x3002;</p>
<hr>
<p><strong>&#x53EF;&#x6267;&#x884C; jar &#x4E0E; Java</strong></p>
<p>Java &#x4E0D;&#x63D0;&#x4F9B;&#x4EFB;&#x4F55;&#x6807;&#x51C6;&#x65B9;&#x5F0F;&#x6765;&#x52A0;&#x8F7D;&#x5D4C;&#x5957;&#x7684; jar &#x6587;&#x4EF6;&#xFF08;&#x6BD4;&#x5982;&#x672C;&#x8EAB;&#x5305;&#x542B;&#x5728; jar &#x4E2D;&#x7684; jar &#x6587;&#x4EF6;&#xFF09;&#x3002;&#x5982;&#x679C;&#x60A8;&#x60F3;&#x5206;&#x53D1;&#x81EA;&#x5305;&#x542B;&#x7684;&#x5E94;&#x7528;&#xFF0C;&#x8FD9;&#x53EF;&#x80FD;&#x662F;&#x4E2A;&#x95EE;&#x9898;&#x3002;</p>
<p>&#x4E3A;&#x4E86;&#x89E3;&#x51B3;&#x6B64;&#x95EE;&#x9898;&#xFF0C;&#x8BB8;&#x591A;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#x4F7F;&#x7528;&#x4E86; <strong>uber</strong> jar&#xFF0C;uber jar &#x4ECE;&#x6240;&#x6709;&#x5E94;&#x7528;&#x7684;&#x4F9D;&#x8D56;&#x4E2D;&#x6253;&#x5305;&#x6240;&#x6709;&#x7684;&#x7C7B;&#x5230;&#x4E00;&#x4E2A;&#x5F52;&#x6863;&#x4E2D;&#x3002;&#x8FD9;&#x79CD;&#x65B9;&#x6CD5;&#x7684;&#x95EE;&#x9898;&#x5728;&#x4E8E;&#xFF0C;&#x60A8;&#x5F88;&#x96BE;&#x770B;&#x51FA;&#x5E94;&#x7528;&#x7A0B;&#x5E8F;&#x5B9E;&#x9645;&#x4E0A;&#x4F7F;&#x7528;&#x5230;&#x4E86;&#x54EA;&#x4E9B;&#x5E93;&#x3002;&#x5982;&#x679C;&#x5728;&#x591A;&#x4E2A; jar &#x4E2D;&#x4F7F;&#x7528;&#x4E86;&#x76F8;&#x540C;&#x7684;&#x6587;&#x4EF6;&#x540D;&#xFF08;&#x4F46;&#x5185;&#x5BB9;&#x4E0D;&#x540C;&#xFF09;&#xFF0C;&#x8FD9;&#x4E5F;&#x53EF;&#x80FD;&#x4EA7;&#x751F;&#x95EE;&#x9898;&#x3002;</p>
<p>Spring Boot &#x91C7;&#x7528;&#x4E86;<a href="#executable-jar">&#x4E0D;&#x540C;&#x65B9;&#x65B9;&#x5F0F;</a>&#xFF0C;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x5BF9; jar &#x8FDB;&#x884C;&#x5D4C;&#x5957;&#x3002; </p>
<hr>
<p>&#x8981;&#x521B;&#x5EFA;&#x53EF;&#x6267;&#x884C; jar&#xFF0C;&#x6211;&#x4EEC;&#x9700;&#x8981;&#x5C06; <code>spring-boot-maven-plugin</code> &#x6DFB;&#x52A0;&#x5230; <code>pom.xml</code> &#x6587;&#x4EF6;&#x4E2D;&#x3002;&#x5728; <code>dependencies</code> &#x4E0B;&#x65B9;&#x63D2;&#x5165;&#x4EE5;&#x4E0B;&#x914D;&#x7F6E;&#xFF1A;</p>
<pre class="language-"><code class="lang-xml"><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>build</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>plugins</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>plugin</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>groupId</span><span class="token punctuation">&gt;</span></span>org.springframework.boot<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>groupId</span><span class="token punctuation">&gt;</span></span>
            <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>artifactId</span><span class="token punctuation">&gt;</span></span>spring-boot-maven-plugin<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>artifactId</span><span class="token punctuation">&gt;</span></span>
        <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>plugin</span><span class="token punctuation">&gt;</span></span>
    <span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>plugins</span><span class="token punctuation">&gt;</span></span>
<span class="token tag"><span class="token tag"><span class="token punctuation">&lt;/</span>build</span><span class="token punctuation">&gt;</span></span>
</code></pre>
<p><strong>&#x6CE8;&#x610F;</strong></p>
<blockquote>
<p><code>spring-boot-starter-parent</code> POM &#x5305;&#x542B;&#x4E86; <code><span class="token tag"><span class="token tag"><span class="token punctuation">&lt;</span>executions</span><span class="token punctuation">&gt;</span></span></code> &#x914D;&#x7F6E;&#xFF0C;&#x7528;&#x4E8E;&#x7ED1;&#x5B9A; <code>repackage</code> &#x3002;&#x5982;&#x679C;&#x60A8;&#x6CA1;&#x6709;&#x4F7F;&#x7528;&#x7236; POM&#xFF0C;&#x60A8;&#x9700;&#x8981;&#x81EA;&#x5DF1;&#x58F0;&#x660E;&#x6B64;&#x914D;&#x7F6E;&#x3002;&#x6709;&#x5173;&#x8BE6;&#x7EC6;&#x7684;&#x4FE1;&#x606F;&#xFF0C;&#x8BF7;&#x53C2;&#x9605;<a href="https://docs.spring.io/spring-boot/docs/2.0.0.RELEASE/maven-plugin/usage.html" target="_blank">&#x63D2;&#x4EF6;&#x6587;&#x6863;</a>&#x3002;</p>
</blockquote>
<p>&#x4FDD;&#x5B58; <code>pom.xml</code> &#x5E76;&#x5728;&#x547D;&#x4EE4;&#x884C;&#x4E2D;&#x8FD0;&#x884C; <code>mvn package</code>&#xFF1A;</p>
<pre class="language-"><code>$ mvn package

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building myproject 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] .... ..
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ myproject ---
[INFO] Building jar: /Users/developer/example/spring-boot-example/target/myproject-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:2.0.0.RELEASE:repackage (default) @ myproject ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
</code></pre><p>&#x5982;&#x679C;&#x60A8;&#x6D4F;&#x89C8; <code>target</code> &#x76EE;&#x5F55;&#xFF0C;&#x60A8;&#x5E94;&#x8BE5;&#x4F1A;&#x770B;&#x5230; <code>myproject-0.0.1-SNAPSHOT.jar</code>&#x3002;&#x8BE5;&#x6587;&#x4EF6;&#x7684;&#x5927;&#x5C0F;&#x5927;&#x7EA6;&#x4E3A; 10 MB&#x3002;&#x5982;&#x679C;&#x60A8;&#x60F3;&#x8981;&#x67E5;&#x770B;&#x91CC;&#x9762;&#x7684;&#x5185;&#x5BB9;&#xFF0C;&#x53EF;&#x4EE5;&#x4F7F;&#x7528; <code>jar tvf</code>&#xFF1A;</p>
<pre class="language-"><code class="lang-bash">$ jar tvf target/myproject-0.0.1-SNAPSHOT.jar
</code></pre>
<p>&#x60A8;&#x5E94;&#x8BE5;&#x8FD8;&#x4F1A;&#x5728; <code>target</code> &#x76EE;&#x5F55;&#x4E2D;&#x770B;&#x5230;&#x4E00;&#x4E2A;&#x540D;&#x4E3A; <code>myproject-0.0.1-SNAPSHOT.jar.original</code> &#x7684;&#x8F83;&#x5C0F;&#x6587;&#x4EF6;&#x3002;&#x8FD9;&#x662F;&#x5728; Spring Boot &#x91CD;&#x65B0;&#x6253;&#x5305;&#x4E4B;&#x524D;&#x7531; Maven &#x6240;&#x521B;&#x5EFA;&#x7684;&#x539F;&#x59CB; jar &#x6587;&#x4EF6;&#x3002;</p>
<p>&#x4F7F;&#x7528; <code>java -jar</code> &#x547D;&#x4EE4;&#x8FD0;&#x884C;&#x8BE5;&#x5E94;&#x7528;&#xFF1A;</p>
<pre class="language-"><code>$ java -jar target/myproject-0.0.1-SNAPSHOT.jar

  .   ____          _            __ _ _
 /\\ / ___&apos;_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | &apos;_ | &apos;_| | &apos;_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  &apos;  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::  (v2.0.0.RELEASE)
....... . . .
....... . . . (log output here)
....... . . .
........ Started Example in 2.536 seconds (JVM running for 2.864)
</code></pre><p>&#x8DDF;&#x4E4B;&#x524D;&#x4E00;&#x6837;, &#x8981;&#x5E73;&#x6ED1;&#x9000;&#x51FA;&#x5E94;&#x7528;&#xFF0C;&#x8BF7;&#x6309; <code>ctrl-c</code>&#x3002;</p>
<p><a id="getting-started-whats-next"></a></p>
<h2 id="12&#x3001;&#x4E0B;&#x4E00;&#x6B65;">12&#x3001;&#x4E0B;&#x4E00;&#x6B65;</h2>
<p>&#x5E0C;&#x671B;&#x60A8;&#x5728;&#x672C;&#x7AE0;&#x8282;&#x5B66;&#x5230;&#x4E86;&#x4E00;&#x4E9B; Spring Boot &#x7684;&#x57FA;&#x7840;&#x77E5;&#x8BC6;&#xFF0C;&#x5E76;&#x4E14;&#x5F00;&#x59CB;&#x7F16;&#x5199;&#x81EA;&#x5DF1;&#x7684;&#x5E94;&#x7528;&#x3002;&#x5982;&#x679C;&#x60A8;&#x662F;&#x4E00;&#x540D;&#x9762;&#x5411;&#x4EFB;&#x52A1;&#xFF08;task-oriented&#xFF09;&#x7684;&#x5F00;&#x53D1;&#x4EBA;&#x5458;&#xFF0C;&#x60A8;&#x53EF;&#x80FD;&#x60F3;&#x8DF3;&#x8FC7; <a href="https://spring.io/" target="_blank">spring.io</a> &#x800C;&#x76F4;&#x63A5;&#x9605;&#x8BFB;&#x4E00;&#x4E9B;&#x80FD;&#x89E3;&#x51B3;<strong>&#x5982;&#x4F55;&#x4F7F;&#x7528; Spring &#x6765;&#x89E3;&#x51B3;&#xFF1F;</strong> &#x8FD9;&#x7C7B;&#x95EE;&#x9898;&#x7684;<a href="https://spring.io/guides/" target="_blank">&#x5165;&#x95E8;&#x6307;&#x5357;</a>&#xFF0C;&#x6B64;&#x5916;&#x6211;&#x4EEC;&#x8FD8;&#x6709; Spring Boot &#x4E13;&#x95E8;&#x7684; <a href="#howto">How-to</a> &#x53C2;&#x8003;&#x6587;&#x6863;&#x3002;</p>
<p><a href="https://github.com/spring-projects/spring-boot" target="_blank">Spring Boot &#x4ED3;&#x5E93;</a>&#x8FD8;&#x6709;&#x5F88;&#x591A;&#x60A8;&#x53EF;&#x4EE5;&#x8FD0;&#x884C;&#x7684;<a href="https://github.com/spring-projects/spring-boot/tree/v2.0.0.RELEASE/spring-boot-samples" target="_blank">&#x793A;&#x4F8B;</a>&#x3002;&#x793A;&#x4F8B;&#x4E0E;&#x5176;&#x4F59;&#x90E8;&#x5206;&#x7684;&#x4EE3;&#x7801;&#x662F;&#x72EC;&#x7ACB;&#x7684;&#xFF08;&#x4E5F;&#x5C31;&#x662F;&#x8BF4;&#xFF0C;&#x60A8;&#x4E0D;&#x9700;&#x8981;&#x6784;&#x5EFA;&#x5176;&#x4ED6;&#x7684;&#x4EE3;&#x7801;&#x6765;&#x8FD0;&#x884C;&#x6216;&#x4F7F;&#x7528;&#x793A;&#x4F8B;&#xFF09;&#x3002;</p>
<p>&#x63A5;&#x4E0B;&#x6765;&#x9605;&#x8BFB;&#x7684;&#x662F;&#x7B2C;&#x4E09;&#x90E8;&#xFF1A;<a href="#using-boot">&#x4F7F;&#x7528; Spring Boot</a>&#x3002;&#x5982;&#x679C;&#x60A8;&#x771F;&#x7684;&#x611F;&#x5230;&#x538C;&#x5026;&#x4E86;&#xFF0C;&#x53EF;&#x4EE5;&#x8DF3;&#x8FC7;&#x8BE5;&#x90E8;&#x5206;&#x76F4;&#x63A5;&#x9605;&#x8BFB; <a href="#boot-features">Spring Boot &#x7279;&#x6027;</a>&#x3002;</p>
<footer class="page-footer"><span class="copyright">powered by Gitbook</span><span class="footer-modification">File Modify: 
2020-01-07 23:30:15
</span></footer>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="boot-documentation.html#_advanced_topics" class="navigation navigation-prev " aria-label="Previous page: 7、高级内容">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="getting-started.html#getting-started-introducing-spring-boot" class="navigation navigation-next " aria-label="Next page: 8、Spring Boot 简介">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"二、入门","level":"1.4","depth":1,"next":{"title":"8、Spring Boot 简介","level":"1.4.1","depth":2,"anchor":"#getting-started-introducing-spring-boot","path":"pages/getting-started.md","ref":"pages/getting-started.md#getting-started-introducing-spring-boot","articles":[]},"previous":{"title":"7、高级内容","level":"1.3.7","depth":2,"anchor":"#_advanced_topics","path":"pages/boot-documentation.md","ref":"pages/boot-documentation.md#_advanced_topics","articles":[]},"dir":"ltr"},"config":{"plugins":["github","splitter","tbfed-pagefooter","-lunr","-search","search-plus","github-buttons","copy-code-button","prism","-highlight","-livereload","livereload"],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"tbfed-pagefooter":{},"prism":{"css":["prismjs/themes/prism-twilight.css"]},"github":{"url":"https://gitee.com/lichongbing/springboot"},"splitter":{},"fontsettings":{"theme":"white","family":"sans","size":2},"github-buttons":{"repo":"lichongbing/springboot","types":["star","watch"],"size":"small"},"copy-code-button":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"search-plus":{},"image-captions":{"caption":"_CAPTION_"}},"theme":"default","author":"lichongbing.com","pdf":{"pageNumbers":true,"fontSize":16,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":36,"bottom":36}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"Spring Boot 中文文档","language":"zh-hans","links":{"sharing":{"all":true,"facebook":true,"google":true,"twitter":true,"qzone":true,"weibo":true}},"gitbook":"*","description":"Spring Boot 中文文档","extension":null},"file":{"path":"pages/getting-started.md","mtime":"2020-01-07T14:30:15.084Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-01-07T14:47:40.777Z"},"basePath":"..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../gitbook/gitbook.js"></script>
    <script src="../gitbook/theme.js"></script>
    
        
        <script src="../gitbook/gitbook-plugin-github/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/jquery.mark.min.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-search-plus/search.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-github-buttons/plugin.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-copy-code-button/toggle.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

